Please use the Apache issue tracking system for new NetBeans issues (https://issues.apache.org/jira/projects/NETBEANS0/issues) !!
Bug 214819 - Completion list is corrupted after IDE upgrade
Completion list is corrupted after IDE upgrade
Status: VERIFIED FIXED
Product: javafx
Classification: Unclassified
Component: Editor
7.2
PC Linux
: P1 (vote)
: 7.2
Assigned To: Petr Somol
issues@javafx
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2012-06-26 17:54 UTC by Vladimir Riha
Modified: 2012-06-28 11:01 UTC (History)
5 users (show)

See Also:
Issue Type: DEFECT
:


Attachments
screenshot (43.90 KB, image/png)
2012-06-26 17:54 UTC, Vladimir Riha
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Riha 2012-06-26 17:54:48 UTC
Created attachment 121402 [details]
screenshot

To reproduce:

1) Download PHP build (sh file) and install it. At this moment if you invoke code completion (at the place of "|") in some css file (or in <style> tag):

div{
color: |
} 

you get a list of colors

2) Upgrade (extend) IDE by installing all modules (JavaEE, JavaSE...) - only from NetBeans Distribution

3) After all is installed, restart IDE and repeat code completion from step 1

=> CC is corrupted (see screenshot)


The same happens with update from Java build to All. 



Product Version: NetBeans IDE 7.2 RC1 (Build 201206252201)
Java: 1.7.0_05; Java HotSpot(TM) Client VM 23.1-b03
System: Linux version 3.0.0-21-generic-pae running on i386; UTF-8; en_US (nb)
Comment 1 Vladimir Riha 2012-06-26 18:05:16 UTC
Note that at least completion list for "background" property is also broken
Comment 2 Vladimir Riha 2012-06-26 18:23:02 UTC
I guess that completion for every property which could have some color value is broken. Some more examples: border, box-shadow, outline, outline-color
Comment 3 Petr Hejl 2012-06-26 19:42:37 UTC
Vlado, is this really P1? Looks like P2 or P3 to me.
Comment 4 Vladimir Riha 2012-06-26 21:01:38 UTC
Maybe but after the upgrade I didn't find a way to make the cc working as before again. If the color values are the only one affected, it could have a lower priority.
Comment 5 Marek Fukala 2012-06-27 05:54:22 UTC
It is broken due to installation of java fx css editor extension which is completely screwed up and I never even thought it was ment to be seriously put into a build.
Comment 6 Marek Fukala 2012-06-27 05:59:43 UTC
javafx2.editor should not install its erroneous CssEditorModule extension. From what I remember when Anton was making it it was never properly completed, it was just a prototype, at least from my point of view.

If javafx needs really this it requires non trivial fixes on the css editor side to make it work properly.
Comment 7 Marian Mirilovic 2012-06-27 11:26:59 UTC
This is a stopper for NB 7.2 RC1, please evaluate and resolve by 10pm CEST Today!
Thanks in advance.
Comment 8 Marek Fukala 2012-06-27 13:43:45 UTC
Upon an agreement with Petr Somol, I've fixed the most flagrant issues in the javafx css editor module properties definition file.

I've also added some kind of support in the css.editor module allowing the editor features to access proper set of css properties based on the file project.

If the project is java-fx project, then the java fx extension properties are not taken into account.

http://hg.netbeans.org/web-main/rev/b95f9fa4d86e

Petr needs to implement the CssModuleSupport's

private static boolean isJavaFxProject(Project project) {
    3.46 +        //Petr Somol, please add an proper implementation here!
    3.47 +        return false;
    3.48 +    }

method to make it really work.
Comment 9 Marek Fukala 2012-06-27 13:45:27 UTC
css.editor module tests passes, the fix should not cause any regressions. I haven't tested the java fx css editing at all, so this is fully up to Petr and/or Vlada.
Comment 10 Marek Fukala 2012-06-27 13:51:13 UTC
btw the changes to the javafx2.properties are not really necessary. So if you want to minimize the risk (and keep the absolutely screwed state of the java fx's css editor) just integrate the changes to the css.editor module along with implementing the mentioned isJavaFxProject(...) method.

There's some risk of integrating the javafx2.properties file changes since I just edited the file w/o really testing it or running any unit tests (if there are any at the javafx side).

I also expect Petr will run the necessary actions regarding the 72 integration process (review, verification, testing, merge ...).
Comment 11 Vladimir Riha 2012-06-27 13:56:22 UTC
(In reply to comment #9)
> css.editor module tests passes, the fix should not cause any regressions. I
> haven't tested the java fx css editing at all, so this is fully up to Petr
> and/or Vlada.

Thanks Marku, I'll try to reproduce the upgrade scenario and test css as well. As for the JavaFX, I don't know it at all, maybe Stepan can help?
Comment 12 Marek Fukala 2012-06-27 14:02:40 UTC
I've just noticed I'd forgotten to negate one boolean, so Petre please apply following diff along with implementing the isJavaFxproject() method. Thanks

diff -r f5f858033c0d css.editor/src/org/netbeans/modules/css/editor/module/CssModuleSupport.java
--- a/css.editor/src/org/netbeans/modules/css/editor/module/CssModuleSupport.java	Wed Jun 27 15:38:59 2012 +0200
+++ b/css.editor/src/org/netbeans/modules/css/editor/module/CssModuleSupport.java	Wed Jun 27 16:01:52 2012 +0200
@@ -280,7 +280,7 @@
     }
     
     public static Collection<Property> getProperties(FileObject file) {
-        return getProperties(isJavaFxCssFile(file));
+        return getProperties(!isJavaFxCssFile(file));
     }
Comment 13 Petr Somol 2012-06-27 15:34:48 UTC
rest of fix pushed in jetmain:
http://hg.netbeans.org/jet-main/rev/77acb6ad5cf3
Comment 14 Vladimir Riha 2012-06-27 17:48:06 UTC
verified in trunk

I build from web-main with Petr's changes from jetmain, add a RC catalog link as a new source to Tools|Plugins and upgrade from build (cluster basic) to All. CSS and JavaFX CSS seems fine.


Product Version: NetBeans IDE Dev (Build 20120627-50e56ee1d85b)
Java: 1.7.0_05; Java HotSpot(TM) Client VM 23.1-b03
System: Linux version 3.0.0-21-generic-pae running on i386; UTF-8; en_US (nb)
Comment 15 Petr Somol 2012-06-27 18:31:55 UTC
transplanted to releases release72 branch as changesets
033bd6edb71e, 87746ae04f6c, 6de9714f7a75
Comment 16 Quality Engineering 2012-06-28 04:53:47 UTC
Integrated into 'main-golden', will be available in build *201206280002* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/b95f9fa4d86e
User: Marek Fukala <mfukala@netbeans.org>
Log: #214819 - not yet complete fix - Completion list is corrupted after IDE upgrade
Comment 17 Quality Engineering 2012-06-28 05:07:46 UTC
Integrated into 'releases', will be available in build *201206272359* or newer. Wait for official and publicly available build.
Changeset: http://hg.netbeans.org/releases/rev/033bd6edb71e
User: Marek Fukala <mfukala@netbeans.org>
Log: #214819 - not yet complete fix - Completion list is corrupted after IDE upgrade
Comment 18 Vladimir Riha 2012-06-28 11:01:11 UTC
verified in 7.2

Product Version: NetBeans IDE 7.2 RC1 (Build 201206272359)
Java: 1.7.0_05; Java HotSpot(TM) Client VM 23.1-b03
System: Linux version 3.0.0-21-generic-pae running on i386; UTF-8; en_US (nb)


By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2014, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo