Giter Site home page Giter Site logo

cats's Introduction

Build Status

CATS

CATS is an IDE for TypeScript and Web developers. CATS is open source software released under the Apache 2.0 license and runs on Linux, Windows and OS X. CATS itself is also written in TypeScript, so you can easily customize it to your needs if required.

And who wants to develop cutting edge web applications in a boring, uninspiring IDE. So now CATS also can be completely themed to your taste. And the great thing, you can use plain CSS to do so.

Although still new features are being added, CATS is already very usable and has built-in support for the following:

  • Intelligent code editor and code completion.
  • Syntax highlighting for over 110 languages (TextMate/Sublime Text.tmlanguage files can be imported).
  • Support for code snippets.
  • Support for refactoring and smart navigation.
  • Very fast compilation of TypeScript to JavaScript.
  • Full validation of your source code while you are typing.
  • All the typical editing features like folding, indentation and code formatting.
  • Run your application from within IDE and using the WebKit debugger to debug.
  • Flexible build system with support for external build systems like Grunt, Jake, Gulp and Makefiles.

CATS always supports the latest versions of TypeScript, so you are able to use all the new features.

Getting Started

The easiest way to start using CATS it to follow these steps:

  • In case you haven't already installed NW.js (previously known as node-webkit) on your machine, do that first. You can download NW.js from the following page: NW.js downloads.

    Make sure you download at least version 0.16.x or higher, since CATS relies on some ES6 features that are missing from earlier versions. Also if you want to be able to debug, get the SDK version.

  • Get the CATS binary package (it is a file called cats-x.y.z.nw). You can download it from the following location:

    CATS releases

After you done just go to the directory where you downloaded the CATS package and type:

/path/to/nw cats-x.y.z.nw

/path/to/nw is the binary file of NW.js. On Windows, it’s nw.exe; On Linux, it’s nw; On Mac, it’s nwjs.app/Contents/MacOS/nwjs.

If you already have a directory with TypeScript files, just select that directory from Project -> Open project... to start editing your files. Alternatively you can open any directory as a project and start adding the different TypeScript files as you go along with your project.

Configuration

CATS will look for tsconfig files in the folder you opened from within IDE (Project -> Open Project....). If a tsconfig file was found, CATS will use the values configured in that file. Otherwise it will create an empty tsconfig file in the root directory and use that instead.

To find out more, check TSConfig File

Bugs and Issues

In case you encounter an issue, you can open a ticket on Github. Also enhancement requests can be entered here: Github issue tracker

Todo

The todo list items are tracked as enhancement requests on GitHub. You can check them out at:

Todo List

There is also a milestone planning in there when some enhancements should be delivered.

cats's People

Contributors

chinhodado avatar diullei avatar duanyao avatar fasterthanlime avatar johnmurga avatar maryo avatar mihailik avatar rombusevil avatar simonmika avatar ztkavc avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cats's Issues

Incorrect type-reporting when using generics

It seems there's a problem with type-reporting when using generics in interfaces:

interface Handler<Event> { (event: Event) : void }

interface LoginEvent { username: string }

var handler: Handler<LoginEvent>;

In the TypeScript Playground, if I hover over the handler variable, the reported type is Handler<LoginEvent>, as defined - but if I hover over the same variable in CATS, the reported type is simply Handler.

Maybe the TypeScript engine needs an update?

Support incremental updates

Right now when a TypeScript file is updated in the editor, the whole content is send to the worker to check for possible issues. This forces the compiler to refresh a large part of he AST.

Compiler has support for incremental updates that should improve performance and reduce CPU load.

Bug: no active tab after closing currently active tab

After closing the active tab, no tab is active and the area under the tabs is empty - you have to click on another tab to bring back the editor.

When closing the active tab, the previous tab should automatically be activated.

Feature: auto refresh open files

I like to keep the compiled JS file open to review it after compiling.

Currently, files that get updated on disk while open, do not automatically reload/refresh - it would be nice to have an option to auto-refresh open files on change.

If the underlying framework does not provide a way to monitor files for changes, perhaps files could be polled for changes periodically, and/or when you switch tabs?

Windows Path

src\cats\commands\projectcommands.ts, line 75:

if (name.charAt(0) !== PATH.sep) {
name = PATH.join(project.projectDir, name);
}

Thats fine for unix but in windows I get "C:\foo\C:\foo\bar.js"

Should be something like
if (name.charAt(0) !== PATH.sep && name.charAt(1) !== ':' ) {

Could you point me to some pretty guide about pull requests in github?

.settings\config.json is not created

I create an empty directory and start cats on it.
If I press project->properties the ide "does nothing" and I got error message in console:
Caught exception: Error: ENOENT, no such file or directory 'c:\develop\jeka\helloworld\node_files_watch.settings\config.json'
If I create empty config.json manually it opens well with default values.
In previous version automatic creation of config.json did worked.

Not refreshing Files tree view on file delete causing crash.

I try do delete file from Files tree (rmb->Delete)....
Filename still exists in Files tree. (file is actually deleted, but it is invisible)
I try to delete it from Files tree second time....
IDE crashes:

Uncaught node.js Error

Error: ENOENT, no such file or directory 'C:\develop\jeka\helloworld\cats\samples\greeter\greeter.js.map'
at Object.fs.statSync (fs.js:524:18)
at Object.remove (file:///C:/develop/jeka/helloworld/cats/lib/main.js:12:29)
at MenuItem.deleteFile as click
at MenuItem.handleEvent (menuitem.js:167:12)
at IDWeakMap.global.__nwObjectsRegistry.handleEvent (node.js:496:26)

Saving a new file

When creating a new file (via File -> New File) in an open project and saving it, the file seems to get saved in the cats root folder, rather than in the project's root folder. Tooks me some searching to figure out where the file went ;-)

outputOption is not working on Windows

Seems that on Windows the outputOption compiler configuration parameter doesn't work correctly. Somehow TypeScript doesn't rewrite the output files correctly. Example:

d:/ts/cats/tmp/d:\ts\cats\src\cats\acesession.js

outputOption was set to "d:/ts/cats/tmp"

Perhaps all file names need to have forward slashes (Unix style) before sending to TypeScript worker.

Separate IO module

Put all the IO related stuff in a special module, so it could be easily replaced with other implementation.

This would make it possible for example to use a server-side components instead of Node within the WebKit environment.

Improve FileTree

Improve FileTree component, to include:

  • refresh capabilities
  • rendering text within a span so better CSS styling can be done
  • better icon to indicate open/close of directory

resizing editor area

When the main browser windows re-sizes, the editor pane doesn't re-size automatically. Have to check how to inform the ACE editor to re-size itself to the full available area.

Expose more compiler options

More compiler options should be configurable and passed to compiler to allow greater flexibility when compiling TypeScript to JavaScript

Sourcemap support

Is it possible to generate sourcemaps from CATS?
That is a very important feature for debugging the code.
Praise: good work for creating CATS, looks cool and has most of the good refactoring/navigation features 👍

Integrate debugging

Enable true debugging from within the IDE (and not only using the WebKit developers tools). This would require more integration of WebKit/V8 and CATS.

I cannot contact the author

Hi Peter,

I cannot contact you. Your website doesn't work and you don't have a public email address in github.
I would like to ask you for some task where I could help you with this project (maybe something simple to start with).

Best regards,
David

PS Sorry for this "pseudo" issue

Problems closing and opening projects

I've run into a couple of odd problems when opening and closing projects.

Currently, the "Close Project" command in the "Project" menu does nothing the first time you click it - and the second time, an exception is thrown.

Opening another project works - however, if you close the first project after opening a second project, the entire application (both projects) close.

Improve theme handling

Theme handling should be done by using some css rules and update these rules, not by setting css style properties on individual elements.

Empty menu list

Node-Webkit: Prebuilt binaries (v0.4.0 — Jan 18, 2013)
CATS: current

This is appear on Win 7 x64 on 2 my laptops.
Empty menu lists File, Edit, Source. Other menus looks nice.

bg

Full Project scope in Outline panel

The Outline panel only displays the modules and classes (etc.) in the currently active tab.

I don't think this is how a traditional outline in an IDE works?

Normally it's per project, rather than per file - so you can get a complete over of all the components (modules and classes etc.) in a single view, rather than having this view switch as you tab through files.

UI framework

Invest in reusing existing UI framework or improve own code base. Things to look for:

  1. Abstract HTML& CSS so almost everything can be done in TS.
  2. Integrate well with TS (so typed declaration files should be possible)
  3. RIA support
  4. Fast, lean and not much overhead (doesn't have to support old browsers etc).
    5)) Has widgets like:
  • Tabs
  • Flexible layout engine
  • Tree
  • Grid
  • Menu

possible case insensitive sort issue..

Just reading the code, I wonder if you mean this code in isense.ts...

// Case insensitive sorting
function caseInsensitiveSort(a: { name: string; }, b: { name: string; }) {
if (a.name.toLowerCase() < b.name.toLowerCase()) return -1;
if (a.name.toLowerCase() > b.name.toLowerCase()) return 1;
return 0;
}

To be more like this..

// Case insensitive sorting
function caseInsensitiveSort(a: { name: string; }, b: { name: string; }) {
if (a.name.toLowerCase() < b.name.toLowerCase()) return -1;
if (a.name.toLowerCase() > b.name.toLowerCase()) return 1;
// the lower-case strings are equal, so now put them in local order..
if (a.name < b.name) return -1;
if (a.name > b.name) return 1;
return 0;
}

This code will cause strings which different only in case to be adjacent to eachother, but in a deterministic way without collisions.

Mysterious issues when saving files

I'm running into something very strange when I save - sometimes a line or a small change somewhere does not get saved.

I just pulled the latest updates, including the updated version of Ace, and this problem started before that update.

It's not 100% consistently reproducible, and I'm not able to precisely pinpoint what triggers it - it seems to be dependent on timing, so bear with me, you may have to try this a few times to reproduce it.

Try something simple, like this:

console.log('foo');
console.log('bar');

With "build on save" enabled, press CTRL+S and open the generated file - the generated JS should be largely identical to the JS, but now go back to the first line and change it, so your file looks like:

console.log('foo', 'baz');
console.log('bar');

Immediately after making the change, press CTRL+S, and then look at the generated file - it likely still reads 'foo' rather than 'foo', 'baz' in the first line??

Sometimes this can really trip you up - I've spent quite some time chasing "phantom bugs" already, because often, making another change, or undoing and hitting save, just saves the previous version of your code.

In a few cases, I have even had lines of code that were not saved to the output file at all, or lines of code that I had deleted which were still being saved. For two nights I have been chasing this one bug in my tree control, and finally I started poking through the generated source code and noticed one line was not being saved at all. (I keep my IDE running for days, hibernating my system instead of shutting down.)

Closing the IDE entirely and starting fresh usually brings things back to normal.

I wonder if there is some command you need to issue to ACE or something, prior to save, to make sure the state of the document reflects what's on screen?

Improve code completion performance

With a large set of possible completions, scrolling in the current popup becomes slow. A different approach is needed for building the popup window.

"Problems" tab is blank

Is the "Problems" tab supposed to populate with a list of all errors/warnings?

I don't see anything in this tab, while editing or after compiling.

Fantastic work, by the way! Best thing I have found for TypeScript so far :-)

Autocomplete behaviour

It would be useful for api discovery to be able to display matching symbols ignoring case sensitivity and searching anywhere in the symbol.

For example, if someone was looking for HTMLCanvasElement class and that person might have forgotten what it is called, just typing canvas and ctrl+space would not show HTMLCanvasElement. Allowing to search without case sensitivity and anywhere in the symbol would allow HTMLCanvasElement by just typing canvas.

Copy/Paste from menu

Copy/Paste from menu doesn't work. The keyboard shortcuts work fine.

Reason is that there isn't an editor command for it. Seems Ace editor uses the native OS solution for copy/paste and not a special ACE command. So need to investigate how to do this from the menu.

Open new project fails

Sometimes opening a new project fails and no new browser window is shown. Seems to only happen when same project is opened again. A different project opens fine.

Refactoring: rename type

Rename a type (method, property, class, interface, ...) and automatically update all references to this type.

Jsdoc support

Do you provide in the future JSDOC support, like MS does for Visual Studio.

Provide documentation

Should provide documentation (perhaps also video) on how to use CATS. Topics that are not self explanatory:

  • Configuration projects
  • Configuration IDE
  • Re-factoring

References not read/updated correctly

I posted a tiny sample project here to demonstrate this issue - I suggest you clone it locally and open it as a project.

Initially, when I open the "bar.js" file, I get a warning about foo being undefined.

Placing the cursor at the beginning of the document and pressing ENTER (inserting a blank line before the /// <reference tag) causes the error to disappear.

Subsequently, deleting the reference tag does not bring back the error message.

Doing all sorts of editing like copy/paste/undo/redo sometimes triggers an update, but most of the time, it does not - it seems really difficult to get the editor to notice that these changes are being made to the source code at all...

Better find & replace

Implement a find & replace that can search the all the files within the project or within a folder.
(updated based on feedback from maryo)

Console does not scroll

The console tab does not behave (and was not implemented) like the other two tabs at the bottom of the UI ("Problems" and "Search") - it doesn't scroll.

It probably also ought to auto-scroll to the bottom - currently, it overflows after saving/building a few times, and you can't see the status of the last build anymore.

Introduce templates for quick start

Implement template system to quick-start a new project. For example templates for:

  1. Web app using Backbone.js and JQuery
  2. Nodejs server side application
  3. Windows 8 Application
  4. Phonegap Application

Will help newcomers to be more quickly productive. Could also include some sample projects.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.