angelozerr / eclipse-wtp-xml-search

Eclipse WTP/XML Search
Other
12 stars 6 forks source link

bug fixes and improvements #6

Closed gamerson closed 10 years ago

gamerson commented 10 years ago
angelozerr commented 10 years ago

@pascalleclercq it seems that there is a problem with maven inside travis. See https://travis-ci.org/angelozerr/eclipse-wtp-xml-search/builds/25848818 Could you help me please? Thank's!

gamerson commented 10 years ago

This is because of upgrade in tycho to version 19 on my pull, seems it isn't working with maven 3.2.1. Perhaps a higher version of tycho would work?

Exception in thread "main" java.lang.NoSuchMethodError: org.apache.maven.execution.MavenSession.getRepositorySession()Lorg/sonatype/aether/RepositorySystemSession;

at org.eclipse.tycho.core.maven.utils.PluginRealmHelper.execute(PluginRealmHelper.java:92)

at org.eclipse.tycho.p2.resolver.P2TargetPlatformResolver.getDependencyMetadata(P2TargetPlatformResolver.java:144)

at org.eclipse.tycho.p2.resolver.P2TargetPlatformResolver.setupProjects(P2TargetPlatformResolver.java:126)

at org.eclipse.tycho.core.resolver.DefaultTychoDependencyResolver.setupProject(DefaultTychoDependencyResolver.java:87)

at org.eclipse.tycho.core.maven.TychoMavenLifecycleParticipant.afterProjectsRead(TychoMavenLifecycleParticipant.java:77)

at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:317)

at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)

at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)

at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)

at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)

at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

at java.lang.reflect.Method.invoke(Method.java:606)

at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)

at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)

at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)

at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)

On Fri, May 23, 2014 at 8:11 PM, Angelo notifications@github.com wrote:

@pascalleclercq https://github.com/pascalleclercq it seems that there is a problem with maven inside travis. See https://travis-ci.org/angelozerr/eclipse-wtp-xml-search/builds/25848818Could you help me please? Thank's!

— Reply to this email directly or view it on GitHubhttps://github.com/angelozerr/eclipse-wtp-xml-search/pull/6#issuecomment-44001753 .

Greg Amerson Liferay Developer Tools Liferay, Inc. www.liferay.com

gamerson commented 10 years ago

Angelo, I realize I didn't answer your question earlier about an example. The way it works is that with this new feature framework adopters can implement the "getExtends()" method to specify which types the given class must have the correct supertypes. This is useful for us at Liferay because in portlet.xml we don't want they to just specify any old Java class... it needs to be a class with supertype javax.portlet.Portlet

So now the validation will check 1st for class existence and then if class exists it will check if it extends one of the types that is specified by the getExtends()

gamerson commented 10 years ago

Here is an example usage that we have... https://github.com/kuozhang/liferay-ide/blob/f43a8364b22da6e51c6364452a61e7f2e343607f/tools/plugins/com.liferay.ide.xml.search.core/src/com/liferay/ide/xml/search/core/PortletXmlClassQuerySpecification.java#L36-70

see there in the code (its commented out because for Liferay we have another way to lookup the types) but in that comment you can see we can return the types. This works well for both validation and for the content assist (content assist only shows types that match the requirements)

angelozerr commented 10 years ago

Here is an example usage that we have... https://github.com/kuozhang/liferay-ide/blob/f43a8364b22da6e51c6364452a61e7f2e343607f/tools/plugins/com.liferay.ide.xml.search.core/src/com/liferay/ide/xml/search/core/PortletXmlClassQuerySpecification.java#L36-70

Thank's for the info. If I remember I had started to manage extends with extension point with toJava reference like this :

<toJava extends="javax.portlet.filter.ResourceFilter,javax.portlet.filter.RenderFilter,       javax.portlet.filter.ActionFilter, javax.portlet.filter.EventFilter" />

But it's not implemented. I will study your code to support extends with extension point.

gamerson commented 10 years ago

We don't need the code in this pull anymore it has been superseded by others. thanks.