angelozerr / tern.java

Use tern.js in Java context
http://ternjs.net/
Other
249 stars 52 forks source link

project rename, resource path is still under old project name #421

Open whysqwhw opened 8 years ago

whysqwhw commented 8 years ago

Eclipse content assist set auto and prompt more characters.

egg. <link href="css/base.css">

It will prompt "href" and it's value. The former seems supported by jsdt and the latter is by angularjs-eclipse.It's cool.But after I changed the project name, it does not work anymore unless I restart Eclipse. In Eclipse's "Error Log" view there are some resource path errors which are use old project name.

I find some rename related plugins as follows.But I do not how it works.I guess tern.java need do something,so I report a issue here.

org.eclipse.ltk.core.refactoring org.eclipse.ltk.ui.refactoring org.eclipse.jdt.ui org.eclipse.wst.jsdt.ui

angelozerr commented 8 years ago

Could you please give a simple and detailled scenario with your problem, please.

whysqwhw commented 8 years ago

1.Create a new javascript project which named "HelloWorld". In this project, it contains some css files in a folder. The index.html will link the css files.

  1. Input the <link> tag, it will prompt the css files path.
  2. Rename the project's name as "HH2".
  3. The <link> tag cannot prompt the css files path.
  4. Then open the Error Log view of eclipse, there are multiple errors. It shows "Error while collecting resource for container css". Resource '/HelloWorld/css/base.css' does not exist.
  5. The project name is already "HH2", but the eclipse still tries to find the old path. Perhaps the project's context does not change.
angelozerr commented 8 years ago

This issue is not for tern.java, but for https://github.com/angelozerr/eclipse-wtp-webresources

But I think I will give up this project since @mickaelistria is to move features from https://github.com/angelozerr/eclipse-wtp-webresources to WTP HTML Editor step by step.

whysqwhw commented 8 years ago

Yes,hello cow force. I fix it by change WebResourcesIndexManager.performAction function to update WebResourcesProjectConfiguration data; and WebResourcesProviderType.collect function to avoid resource not exists.Is it ok?

mickaelistria commented 8 years ago

@whysqwhw Would you rather be interested in contributing those features to Eclipse directly? As @angelozerr explained, we're trying to move/copy those features to Eclipse WTP directly (where the HTML editor lives). See https://bugs.eclipse.org/bugs/show_bug.cgi?id=495132 for example.

whysqwhw commented 8 years ago

ok,thanks

mickaelistria commented 8 years ago

@whysqwhw a nice contribution would be to try the Gerrit patch I suggested and to report whether it works for your use-case or not ;)