Code Monkey home page Code Monkey logo

angular-eclipse's People

Contributors

angelozerr avatar dominik-myszkowski avatar pascalleclercq avatar probert94 avatar ronatartifact 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

Watchers

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

angular-eclipse's Issues

Refactoring Support

Hi,

I'm trying to refactor my code in Eclipse.

When I rename a class, the new name is not reflected project wide. e.g. the class name in the corresponding module is still the old one.
I have the same problem, when I moving a file. The corresponding path references are not updated.

Is refactoring not supported? or I'm doing something wrong?

Cheers,
Bernd

Show generated files in blueprint Wizards

In the blueprint Wizards (Component, Directive etc.) it would be nice, if we know, which files would be generated.
The gererated files and folders depend on the generated element and the parameters.
For example a Component named "header", generated with "-- spec false" would result in following files:

header\header.component.ts  
header\header.component.css  
header\header.component.html

while generating it with "--inline-template" and "--inline-style" would result in following files:

header\header.component.ts  
header\header.component.spec.ts

You also need to take care about the app-defaults (set in the angular-cli.json). For example you could set the style-extension there, so that header.component.css might become header.component.scss.
This feature could also solve #43.

ng build command not working

I just installed it on a new Eclipse installation and the same ng command that was working on my earlier installation seems to be NOT working any more. Was the 1.2.0-SNAPSHOT recently updated / modified? I noticed a couple of changes:

  • Previously, the output was redirected to Eclipse Console and now it is launched in a Terminal
  • Previously, the command node <path_to_ng_from_preferences> build/serve was executed but now it just launches the ng build which fails as I do not have ng added to my system Path variable and neither can I add it due to corporate policies

Any help would be greatly appreciated!!

Duplicate template id's

Ver. 1.1.0
In the .log file for eclipse I get these warnings:
!ENTRY org.eclipse.jface.text 2 0 2016-10-27 14:56:29.421
!MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.number'

!ENTRY org.eclipse.jface.text 2 0 2016-10-27 14:56:29.429
!MESSAGE Duplicate template id: 'org.eclipse.wst.xslt.templates.xpath.round'

!ENTRY org.eclipse.jface.text 2 0 2016-10-27 14:56:29.449
!MESSAGE Duplicate template id: 'ts.eclipse.ide.jsdt.ui.templates.react.ptelr'

!ENTRY org.eclipse.jface.text 2 0 2016-10-27 14:56:29.456
!MESSAGE Duplicate template id: 'ts.eclipse.ide.jsdt.ui.templates.react.ptir'

Support for ngModule

Angular-CLI has a command for module-generation ("ng g module moduleName").
Using this command, it is possible to create a "normal" module, as well as a "routing" module ("--routing").
It would be cool, if the plugin supports generation for modules and routes, using a Wizard.

Error running ng serve

When I run ng serve, an error is thrown. The server is running anyways, so going to "localhost:4200" will open the app and live reload is enabled.
Stacktrace:

!ENTRY ts.eclipse.ide.angular2.cli 4 0 2017-03-10 19:00:10.302
!MESSAGE Error while opening browser for ng serve.
!STACK 0
java.net.MalformedURLException: For input string: "4200 **"
	at java.net.URL.<init>(Unknown Source)
	at java.net.URL.<init>(Unknown Source)
	at java.net.URL.<init>(Unknown Source)
	at ts.eclipse.ide.angular2.internal.cli.jobs.NgServeJob.runInUIThread(NgServeJob.java:46)
	at org.eclipse.ui.progress.UIJob$1.run(UIJob.java:97)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:35)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:182)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4211)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3827)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$4.run(PartRenderingEngine.java:1121)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1022)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:150)
	at org.eclipse.ui.internal.Workbench$5.run(Workbench.java:693)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:336)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:610)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:148)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:138)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1519)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1492)
Caused by: java.lang.NumberFormatException: For input string: "4200 **"
	at java.lang.NumberFormatException.forInputString(Unknown Source)
	at java.lang.Integer.parseInt(Unknown Source)
	at java.lang.Integer.parseInt(Unknown Source)
	at java.net.URLStreamHandler.parseURL(Unknown Source)
	... 31 more

Problem seems to be, that it wants to open the eclipse browser using "localhost:4200 **", and parsing the Port "4200 **" throws NumberFormatException.

Support for guard generation

Since Angular-CLI RC.0 it is possible to generate a guard using the command "ng generate guard [name]".
The supported options can be found here.

Support for angular-cli generated projects out of the box

As angular-cli is the official tool to generate boilerplate for angular 2 projects, I think it is good to have support for this tool out of the box.

As per documentation, it is recommended to install angular-cli globally with npm install -g angular-cli to use commands directly in the command line. The following commands are some of the most important:

  • ng new PROJECT_NAME: Creates a new project.
  • ng serve: Start a web server with integrated TS compiler and browser auto-reload on save.
  • ng build: Generates distribution artifacts.

I think it will be good if angular2-eclipse have direct short-cuts to these commands and show its output.

In the future it can be considered to allow execute jasmine tests directly in a browser integrated in eclipse, show results, etc...

What do you think?

Tsconfig.json in Angular-CLI RC.0

Since Angular-CLI RC.0 there are multiple tsconfig.json files (more infos here):
-src/tsconfig.app.json for the app

  • src/tsconfig.spec.json for unit tests
  • e2e/tsconfig.e2e.json for e2e tests
  • tsconfig.json for IDE integration

The last one is relevant for the plugin (typescript.java).
By default it looks like this:

{
  "compileOnSave": false,
  "compilerOptions": {
    "outDir": "./dist/out-tsc",
    "sourceMap": true,
    "declaration": false,
    "moduleResolution": "node",
    "emitDecoratorMetadata": true,
    "experimentalDecorators": true,
    "lib": [
      "es2016"
    ]
  }
}

The properties target and module are missing, so default values are used.
Until now target was set as es5 and module was es2015.
Until now the tsconfig.json was inside the ./src-Folder, so that the JS and Map-Files where generated inside the ./dist/out-tsc. Now the tsconfig.json is one level above, resulting in the JS and Map-Files inside ./dist/out-tsc/src.

I guess we should investigate, what a "good" default tsconfig.json for angular2-eclipse should look like and either overwrite the Angulat-CLI one or write a doc regarding this.

Angular2 Nature

How to determine that a project has Angular2 nature?

  • search in the package.json if angular2 exists as dependencies?
  • search from typing folder if angular2 exists?
  • search from node_modules if angular2 exists?

But those folder, package.json could be hosted not only in project root (like src folder). So we could foolw the same idea than angelozerr/typescript.java#12 (comment)

And at the end if the user project doesn't follow thoses rules, user will be able to to "Convert as Angular2" to add Eclipse Angular2 nature to the project.

What do you think about that @micaelgallego @piotrtomiak

eclipse angular2 project creating error

Hello ,
When I try to create angular2 project in eclipse , I get following error:

module.js:327
throw err;
^

Error: Cannot find module 'exists-sync'
at Function.Module._resolveFilename (module.js:325:15)
at Function.Module._load (module.js:276:25)
at Module.require (module.js:353:17)
at require (internal/module.js:12:17)
at Object. (/home/pasa/node_modules/angular-cli/node_modules/ember-cli/lib/models/project.js:11:26)
at Module._compile (module.js:409:26)
at Object.Module._extensions..js (module.js:416:10)
at Module.load (module.js:343:32)
at Function.Module._load (module.js:300:12)
at Module.require (module.js:353:17)
'unknown': unknown terminal type.

Release date for 1.2.0

I know that 1.2.0-SNAPSHOT is already there, but when is the actual 1.2.0 version releasing?

Open/import existing Angular2 project

It would be nice, if I can import a previously created Angular2-eclipse project (or create a new one with existing source) into workspace. In this case 'ng init' should not run, but an optional 'npm install' would be useful.

The motivation behind this is that many users exclude eclipse specific project files from git/svn but after a checkout from this repo it is not needed to use 'ng init'.

Improve use of ng

The preferences Javascript/Typescript/Angular2/CLI 'use ng custom file' is used to add this value in the Path env (when terminal is opened with CLI Wizard). It must be improved

  • to select the folder where ng is stored and not the ng file.
  • display the directory of the the ng folder.
  • validate if ng file exists in the selected folder.

I think it should be cool to check the existing of the ng in the CLI wizard when a project must be generated. In the case of ng doesn't exists, execute "npm install -g angular/cli" before executing "ng new"

@Springrbua what do you think about thoses ideas?

Creating new Angular2 Project does not work (at least on Mac)

I am running Eclipse Neon on my MacBookPro with macOS el capitan.

npm and node are basically installed, i already have successfully implemented the "angular 2 hello world" tutorial project on the command line and could run the ng2 app.

now I tried to make an ng2 project in eclipse, using the angular2-eclipse feature.

after i installed it (without any error message), and try to create a new project by using the new-project wizard for a "new Angular2 project"

the project is created EMPY and console shows the following error(s):

/Users/hansp/.profile: line 4: .bashrc: No such file or directory
/bin/bash: line 1: ng: command not found

No way to change tab formatting.

There seems to be no way to change the tab indentation to 2 spaces. No matter what the editors are set to in terms of formatting and settings in Eclipse, TypeScript editor always indents 4 spaces.

Selected folder is ignored when generating Component, Directive etc.

When I open the "New Angular2 Component" Wizard by right-clicking a folder inside my project, I would expect it to generate the Component inside the selected folder.
But at the moment, the corresponding "ng generate" command is always executed in the applications root.
That means, that every Component is automatically generated in the source-folder ("src") and added to the root-mdule ("AppModule").
I would expect the Component to be generated inside the selected folder and added to the nearest module, just as if "ng generate" was executed inside the selected folder.

It would also be cool to be able to browse the folder from the WizardPage, the selected folder (or application-root) should be the default value.

[angular-cli] support to call ng with embed nodejs

Today the use of angular-cli requires:

  • to install angular-cli globally (npm install -g angular-cli)
  • nodejs installed in the computer

It should be cool to give the capability to execute ng with:

  • embed nodejs
  • any angular-cli (eg: coming from the project).

In other words we could consume ng without installing nodejs or angular-cli. For developer who cannot install nodejs or angular-cli, they could commit in their SVN, Git repository an Eclipse Project which contains node_modules/angular-cli and uses it to execute ng.

Provide an .ember-cli editor

.ember-cli is used to customize port, live reloading of ng server. It uses JSON format. Provode an .ember-cli editor linked to JSON Schema to benefit with completion.

Use wiki

Use wiki to list all your current ideas, roadmap

ng build error

Hello ,
I try to build by using wizard ( run as ng buid) , I get error "Build failed.
The Broccoli Plugin: [Funnel] failed with:
Error: ENOENT: no such file or directory, lstat 'typings'
at Error (native)"

thank your interest

Options when generating a new Project

Angular-CLI supports a few options, when generating a new project.
It would be cool to be able to use them in the Project-Generation-Wizard..
Following options are available (copied from "ng help"):

  --dry-run (Boolean) (Default: false)
    aliases: -d
  --verbose (Boolean) (Default: false)
    aliases: -v
  --link-cli (Boolean) (Default: false)
    aliases: -lc
  --skip-npm (Boolean) (Default: false)
    aliases: -sn
  --skip-git (Boolean) (Default: false)
    aliases: -sg
  --skip-tests (Boolean) (Default: false)
    aliases: -st
  --skip-commit (Boolean) (Default: false)
    aliases: -sc
  --directory (String)                   // Already supported by choosing project-location?
    aliases: -dir <value
  --source-dir (String) (Default: src)
    aliases: -sd <value>
  --style (String) (Default: css)
  --prefix (String) (Default: app) 
    aliases: -p <value>
  --mobile (Boolean) (Default: false)            // Disabled temporarily
  --routing (Boolean) (Default: false)
  --inline-style (Boolean) (Default: false)
    aliases: -is
  --inline-template (Boolean) (Default: false)
    aliases: -it

The most important ones (for me) are the following:

  • skip-tests: No ".spec.ts"-Files generated
  • style: Lets you specify the Style-Type (CSS, SCSS, SASS, LESS)
  • prefix: Lets you specify the prefix for Components, Directives, etc.

Create additional runtime configurations

Just as Run As ng build and Run As ng serve execute the respective commands, it would be nice to have a run configuration that would invoke ng test.

It would also be nice if all three of these commands were added to the Debug As menu, and have the Eclipse debugger connect to the running node.js instance.

Lastly, but perhaps requiring massive amounts of additional work, it would be nice if ng test were also added to the Coverage As menu.

Options when generating new Angular Blueprints

When you generate a Blueprint (Component, Directive etc.) using Angular-CLI you can specify different parameters.
This parameters affect the generated files and folders.
It would be cool, if we could set this parameters inside the Wizards.

Endless loop when generating an already existing element

If you try to generate an Angular element (Component, Directive etc.) which already exists inside the selected directory, Angular-CLI checks, if the execution changes anything.
If the generated files are different, then the existing file, Angular-CLI asks, if you want to overwrite the existing files.
The plugin does not take care about this "question" and so it does not input a valid value (Y,N,D or H).
The result is an endless loop with the following output:

Path-To-Project\src\app>ng generate component core --prefix app --spec false --flat false
installing component
? Overwrite src\app\core\core\core.component.ts? (Yndh) �[56D�[56C�[1000D�[K?  
Overwrite src\app\core\core\core.component.ts? (Yndh) e�[57D�[57C�[1000D�[K?  
Overwrite src\app\core\core\core.component.ts? (Yndh) ex�[58D�[58C�[1000D�[K?  
Overwrite src\app\core\core\core.component.ts? (Yndh) exi�[59D�[59C�[1000D�[K?  
Overwrite src\app\core\core\core.component.ts? (Yndh) exit�[60D�[60C�[1000D�[K?  
Overwrite src\app\core\core\core.component.ts? (Yndh) 
>> Please enter a valid command�[1A�[31D�[56C�[1B�[1000D�[K�[1A�[1000D�[K? Overwrite src\app\core\core\core.component.ts? (Yndh) e�[57D�[57C�[1000D�[K? Overwrite src\app\core\core\core.component.ts? (Yndh) ex�[58D�[58C�[1000D�[K? Overwrite src\app\core\core\core.component.ts? (Yndh) exi�[59D�[59C�[1000D�[K? Overwrite src\app\core\core\core.component.ts? (Yndh) exit�[60D�[60C�[1000D�[K? Overwrite src\app\core\core\core.component.ts? (Yndh) 

This goes on until you terminate the process using the red button in eclipse.
Possible solutions:

  1. Check if the generated files already exist. If they already exist, show an error and disable the "finish" button.

  2. Take care about this result and let the user input a value in the console.

I personaly would preffer the first solution. If the generated files already exist, the user should delete them manually first and then generate them again.

ng is not recognized as internal or external command - windows

Hi,

I've installed eclipse neon and added the 4 plugins from the 1.0.0 download site.
The ng command is not recognized.
I used the build-in nodejs and also tried with an external portable nodejs with angular installed no luck. (the portable nodejs works fine in windows cmd)
Running on windows 8.

Regards
Luc

Angular2 Perspective

Provide Angular2 Perspective to provide the "New" menu Angular2 Class, Pipe, etc wizards

Breaking changes in Angular-CLI (Beta 32)

Angular-CLI beta 32 introduces a few breaking changes, which will affect the plugin.
The breaking changes are listet in the changelog.
Following changes should affect the plugin:

  • The configuration file angular-cli.json has been renamed to .angular-cli.json
  • Generating a module with routing will no longer generate an associated component.
  • Removing the ng init & ng update commands because their current implementation causes more problems than it solves.

Especially the renamed config and the removed commands will cause problems.

Syntax coloring HTML not working

In Eclipse Preferences:

JavaScript -> TypeScript -> Angular2 -> HTML -> Editor -> Syntax Coloring throws an error
After clicking it again, it opens but the syntax coloring can not be changed.

feature request - specify path to ng

Hi,

I am using python virtual environments on linux, with nodeenv, so that all of my node, typescript and angular projects are entirely distinct from each other.

I would like to be able to specify a per-project path to the ng command so that run, tests and build buttons that appear for angular-cli.json work correctly instead of saying

/bin/bash: line 1: ng: command not found

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.