This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 47807 - [40cat] {freeform] Tools>Add to Palette... not working (need AntArtifactQuery)
Summary: [40cat] {freeform] Tools>Add to Palette... not working (need AntArtifactQuery)
Status: CLOSED FIXED
Alias: None
Product: projects
Classification: Unclassified
Component: Ant (show other bugs)
Version: 4.x
Hardware: All All
: P3 blocker (vote)
Assignee: Jesse Glick
URL:
Keywords:
: 48126 49012 (view as bug list)
Depends on: 49221
Blocks: 42682
  Show dependency tree
 
Reported: 2004-08-24 15:35 UTC by shemnon
Modified: 2006-03-24 09:54 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Test Case, full project zip (3.32 KB, application/octet-stream)
2004-08-24 19:38 UTC, shemnon
Details

Note You need to log in before you can comment on or make changes to this bug.
Description shemnon 2004-08-24 15:35:52 UTC
[ BUILD # : Beta1 ]
[ JDK VERSION : J2SE 1.5.0 ]

When selecting a bean to add to the palette from either the "projects" window or "file window," and I either select via context menu or from teh menu bar "Add to Palette..." The component is not added to the palette.  

I do get the popup asking me which category to add it to, but it is never added.  

No stack traces are reported to the messages log either.  I am using the freeform project type, with the appropriate result jars and paths setup in output dir.
Comment 1 Jan Stola 2004-08-24 17:18:45 UTC
I am sorry, I am not able to reproduce this issue. Could you, please,
provide more details about configuration of your project.
Does it happen only with one project/only with freeform projects?
It would be great if you can provide steps describing how to set up
such a problematic project. Thank you in advance.
Comment 2 shemnon 2004-08-24 19:38:01 UTC
Created attachment 17090 [details]
Test Case, full project zip
Comment 3 shemnon 2004-08-24 19:39:43 UTC
Added a test case on 4.0beta1 JDK1.5.0 beta 3 (build 58) Windows 2000.

In projects or files, on either the java class or the .class file,
it's not added.  If I use palette manager and add jar I can add the bean.
Comment 4 Jan Stola 2004-08-25 11:06:06 UTC
Thank you for the test case. Now I was able to reproduce the problem.

When we try to install the bean we attempt to find the jar
the bean comes from. Unfortunately the call
AntArtifactQuery.findArtifactsByType(project, "jar")
on the freeform project doesn't return anything
because it doesn't have AntArtifactProvider.

Reassigning to ant module for evaluation.
Is this as designed? If so, how should we find the right jar?
Comment 5 Petr Hrebejk 2004-08-25 15:52:20 UTC
But propaly isn't a P2. David please decide.
Comment 6 David Konecny 2004-08-25 16:06:33 UTC
Jesse knows more about why freeform does not have AntArtifact and
whether it should or not. I guess that if output jar is specified that
we should provide it.
Comment 7 Jesse Glick 2004-08-25 18:52:51 UTC
There is no AntArtifactQueryImplementation in freeform projects for
4.0. You can use the Palette Manager.

Anyway using AAQ for such a purpose is wrong. A future release will
probably have a BinaryForSourceQuery in which case you can use that.

The form module needs to handle this case properly: issue #47947.
Comment 8 Jesse Glick 2004-08-25 20:03:25 UTC
Actually meant this to be open for 4.1.
Comment 9 Jesse Glick 2004-08-27 19:40:43 UTC
Hold on; <export> element already allowed in freeform project.xml,
just not yet interpreted. May be able to do this for 4.0 after all.
(No GUI configuration for it, however; you would need to set it up
manually in 4.0.)
Comment 10 shemnon 2004-08-27 20:20:48 UTC
There is an "output" node in the properties sheet, that palces the 
jars in /project/configuration/java-data/compilation-unit/built-to.  
I honestly would expect that those values are what are exprted, so 
wouldn't the GUI just be the same as that page?  Couldn't the 
customize just add those entries in addition to it's compilation-unit 
entries?
Comment 11 Jesse Glick 2004-08-30 17:01:04 UTC
*** Issue 48126 has been marked as a duplicate of this issue. ***
Comment 12 Jesse Glick 2004-08-30 23:33:17 UTC
Perhaps. The <export> element includes more information than the
current GUI asks for so it would not be able to set things up as
precisely as you could by editing project.xml. It may be possible to
make guesses that work out most of the time.
Comment 13 Jesse Glick 2004-09-14 18:10:13 UTC
*** Issue 49012 has been marked as a duplicate of this issue. ***
Comment 14 Jesse Glick 2004-09-17 21:25:22 UTC
Have patch which makes it work if you configure the <export>
element(s) in project.xml. Tools -> Add to Palette works (AFAICT), and
you can add the freeform project as a dependency of a j2seproject
(code completion, building, and rebuilding all work).
Comment 15 Jesse Glick 2004-09-17 21:34:22 UTC
See issue #49221 for GUI updating of <export>.
Comment 16 Jesse Glick 2004-09-20 21:02:17 UTC
added       * Up-To-Date  1.1        
ant/freeform/src/org/netbeans/modules/ant/freeform/ArtifactProvider.java
committed   * Up-To-Date  1.28       
ant/freeform/src/org/netbeans/modules/ant/freeform/FreeformProject.java
committed   * Up-To-Date  1.11       
ant/freeform/src/org/netbeans/modules/ant/freeform/resources/freeform-project-general.xsd
added       * Up-To-Date  1.1        
ant/freeform/test/unit/src/org/netbeans/modules/ant/freeform/ArtifactProviderTest.java
committed   * Up-To-Date  1.2         www/www/ns/freeform-project/1.xsd
Comment 17 Jesse Glick 2004-09-22 15:18:59 UTC
*** Issue 49389 has been marked as a duplicate of this issue. ***
Comment 18 shemnon 2004-10-08 15:42:24 UTC
Works in dev build 2004091800