[ 
https://issues.apache.org/jira/browse/IVYDE-68?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Nicolas Lalevée updated IVYDE-68:
---------------------------------

    Attachment: IVYDE-68-r607532.patch

Here is a patch that fix a part of the bug.

In IvydeContainerPage, the use of TypedElementSelectionValidator has been 
replaced by a simple inner implementation of ISelectionStatusValidator

In IvyClasspathUtil, the instanceof check against ClassPathContainer should be 
avoided to be replaced by some getAdapter calls. But the internal 
implementation does not support them. So the code has been change to use some 
getApdapter functions, but the check against ClassPathContainer has been kept 
to kept it working. It might need an opening of a bug in eclipse.
IvyClasspathUtil has also been a little refactored so every Actions are getting 
the selection the same way.

In IvyClasspathContainer, the instanciation of the ClasspathAttribute is done 
with the JavaCore static functions. Some change have aslo been done to be in 
sync with the last Ivy API which cache management has changed.

In IvyPlugin : the Java model is now got from JavaCore.

In OpenIvyFileAction : DialogUtil.openError is simple enought to be copied.

The other warnings that have not been fixed in this patch:
* FixedJavaSearchPage : of course, as it is a rewrite of an internal behavior.
* IvyClasspathContainer#notifyUpdateClasspathEntries : there are some use of 
JavaModelManager. I don't know what it is used for, so I didn't change it.
* IvyClasspathInitializer#requestClasspathContainerUpdate : it use 
JavaDocLocations. It seems there is no other way to accomplish it. As the code 
to copy is that trivial, I preferred keep it as is.

There are also included some change in the build.xml and build.properties to 
get the last released version of Ivy. I don't know if these changes are still 
useful as the dependency is now handled by Eclipse. I have them locally before 
the dependency changed, so I provide them here, feel free to revert them if 
there are not appropriate.





> IvyDE is using some internal classes of Eclipse
> -----------------------------------------------
>
>                 Key: IVYDE-68
>                 URL: https://issues.apache.org/jira/browse/IVYDE-68
>             Project: IvyDE
>          Issue Type: Bug
>    Affects Versions: 1.3.0
>            Reporter: Nicolas Lalevée
>         Attachments: IVYDE-68-r607532.patch
>
>
> Some classes in IvyDE use come classes which are in some 
> {{org.eclipse....internal... }} packages, which should not be used. Compiling 
> IvyDE with Eclipse 3.3 raise warning like :
> {quote}
> Discouraged access: The method containerPut(IJavaProject, IPath, 
> IClasspathContainer) from the type JavaModelManager is not accessible due to 
> restriction on required library 
> /Users/nicolas/tools/eclipse-3.3/plugins/org.eclipse.jdt.core_3.3.1.v_780_R33x.jar
>       ivyde/src/java/org/apache/ivyde/eclipse/cpcontainer     
> IvyClasspathContainer.java      {quote}

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to