petertsehsun / crystalsaf

Automatically exported from code.google.com/p/crystalsaf
0 stars 1 forks source link

Have Crystal annotations be in a library #11

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
When JUnit is installed, there's a way to just add JUnit exports to the
build path. It would be nice if we can do that with the Crystal Annotations
so we don't have to seperately add the jar file.

Original issue reported on code.google.com by ciera.christopher on 24 Sep 2008 at 7:09

GoogleCodeExporter commented 9 years ago
Some more information on how to do this...

There appear to be three relevant extension points for this.

1) Actually adding the library type to the list which the user's can select 
from.
extension point: org.eclipse.jdt.core.classpathContainerInitializer
example: org.eclipse.jdt.internal.junit.buildpath.JUnitContainerInitializer

2) Adding a preference pane to determine which library to select. In Crystal, 
this
might be a list of the various annotations, or maybe it is grouped by the type 
of
analysis.
extension point: org.eclipse.jdt.ui.classpathContainerPage
example: org.eclipse.jdt.internal.junit.buildpath.JUnitContainerWizardPage

3) Have a quick-fix that recognizes Crystal annotations and suggests adding the
library to the classpath.
extension point: org.eclipse.jdt.ui.classpathFixProcessors and
org.eclipse.ui.ide.markerResolution
example: org.eclipse.jdt.internal.junit.ui.JUnitClasspathFixProcessor and
org.eclipse.jdt.internal.junit.buildpath.ClasspathVariableMarkerResolutionGenera
tor

Links to the JUnit examples:
buildpath package with most of the example classes:
http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.junit/src/org/eclipse/j
dt/internal/junit/buildpath/

The plugin.xml file that does this

http://dev.eclipse.org/viewcvs/index.cgi/org.eclipse.jdt.junit/plugin.xml?view=m
arkup

Original comment by ciera.christopher on 25 Sep 2008 at 3:25

GoogleCodeExporter commented 9 years ago

Original comment by ciera.christopher on 12 Dec 2008 at 4:50

GoogleCodeExporter commented 9 years ago
Nels has also suggested creating a Crystal nature, and then automatically 
adding the
jars to the build path by having the user assign the nature to it.

Original comment by ciera.christopher on 12 Dec 2008 at 4:51

GoogleCodeExporter commented 9 years ago
This issue is partially complete. We now have plaid annotations as a "classpath 
container" and the wizard for inserting this container into a project's 
.classpath 
file. See [r117]

I now need to:
1.) Add a quickfix that will recognize when you have plaid annotations but 
don't have 
the library in your classpath.
2.) Add the source and javadoc to the library.

Original comment by nels.bec...@gmail.com on 12 Dec 2008 at 10:22

GoogleCodeExporter commented 9 years ago
Okay... quickfix works. Just have to do the source now. Ugh...

Original comment by nels.bec...@gmail.com on 14 Dec 2008 at 12:13

GoogleCodeExporter commented 9 years ago

Original comment by nels.bec...@gmail.com on 14 Dec 2008 at 12:46