Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Today's Messages (off)  | Unanswered Messages (on)

Forum: Eclipse Platform
 Topic: How to use menus extension to add popup to text editor only for files in projects w/ certain nature
How to use menus extension to add popup to text editor only for files in projects w/ certain nature [message #1059382] Fri, 17 May 2013 15:15
Jeremy Flicker is currently offline Jeremy Flicker
Messages: 1
Registered: May 2013
Junior Member
I would like to contribute actions to the menus of a text editor that are visible only when the file being edited is in a project with a certain nature. But I can't seem to figure out how to use the core expressions to do this through various experiments... Anyone have success doing this?
 Topic: PlatformObject.getAdapter(Class) returns null during start-up
PlatformObject.getAdapter(Class) returns null during start-up [message #1059104] Thu, 16 May 2013 13:36
Brian Vosburgh is currently offline Brian Vosburgh
Messages: 126
Registered: July 2009
Senior Member
We (Dali) adapt the platform interface IProject to the Dali interface ProjectResourceLocator.

This Dali interface and its sole implementation, SimpleProjectResourceLocator, are in the plug-in o.e.jpt.common.core. The IAdapterFactory that implements this "adaptation" is in the same plug-in. And plugin.xml defining the corresponding extension to the o.e.core.runtime.adapters extension point is also in the same plug-in.

The problem: Intermittently, during start-up, a call to IProject.getAdapter(ProjectResourceLocator.class) will return null with the first call but not null with subsequent calls. The adapter factory is implemented in such a way that it will never return null; so, apparently, the adapter factory is not invoked by the platform adapter manager. This seems to be a bug, as the plug-in must have been loaded for the class ProjectResourceLocator to be resolved. Unfortunately, in a test workspace where this happens with every start-up, it never happens when executing under the debugger (even with no breakpoints whatsoever).

Is this expected behavior (i.e. that even though a plug-in is loaded, its adapter factories are not necessarily loaded)? If not, can anyone offer any hints as to how we can investigate, sans the debugger, why the platform adapter manager does not invoke the appropriate adapter factory?
 Topic: Trouble with synchronize extension
Trouble with synchronize extension [message #1058871] Wed, 15 May 2013 09:39
Mhtagada    is currently offline Mhtagada
Messages: 3
Registered: April 2013
Junior Member
Hi,

I have start a plugin and I try to remove one element from the team synchronize view
(like when right clic and choose => remove from view)

but with my code I only remove from the tree not from the entire view

someone can help

IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindowChecked(event);
IWorkbenchPart activPart = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActivePart();
if(activPart instanceof SynchronizeView){
	SynchronizeView syncView = (SynchronizeView)activPart;
	TreeViewer tv = (TreeViewer) ((ISynchronizePage)syncView.getCurrentPage()).getViewer();
	tv.expandAll();

	SynchronizeViewWorkbenchPart synchPart = new SynchronizeViewWorkbenchPart(syncView.getParticipant(), syncView.getSite());

	tv.setSelection(new StructuredSelection(), true);
	tv.addFilter(new ViewerFilter() {
		
		@Override
		public boolean select(Viewer arg0, Object arg1, Object arg2) {
			String elem = arg2.toString();
			if(elem.endsWith(".classpath") || elem.endsWith(".project")){
			return false;
		}
		
		return true;
	}});
}

 Topic: Eclipse JVM on workspace switch
Eclipse JVM on workspace switch [message #1058747] Tue, 14 May 2013 16:51
Nick Collier is currently offline Nick Collier
Messages: 18
Registered: July 2009
Junior Member
Does anyone know how to specify what jvm eclipse will launch itself with when it switches workspace? If I start eclipse with an eclipse.ini containing:

 -vm
Library/Java/JavaVirtualMachines/jdk1.7.0_17.jdk/Contents/Home/bin/java


eclipse launches with that jre. The console output confirms this:

5/14/13 4:01:16.932 PM [0x0-0x51b51b].org.eclipse.eclipse:
eclipse.buildId=M20130204-1200 5/14/13 4:01:16.932 PM
[0x0-0x51b51b].org.eclipse.eclipse: java.version=1.7.0_17 
 5/14/13 4:01:16.932 PM [0x0-0x51b51b].org.eclipse.eclipse: java.vendor=Oracle
Corporation


When I switch the workspace though for some reason it launches itself with a 1.6 jvm.

5/14/13 4:07:51.596 PM [0x0-0x51b51b].org.eclipse.eclipse: eclipse.buildId=M20130204-1200
5/14/13 4:07:51.597 PM [0x0-0x51b51b].org.eclipse.eclipse: java.version=1.6.0_45
5/14/13 4:07:51.597 PM [0x0-0x51b51b].org.eclipse.eclipse: java.vendor=Apple Inc.


This is a problem as our plugins that require 1.7 consquently fail to load. This is on OSX 10.7.5 but it also happens on 10.8.

JAVA_HOME points to the 1.7 jvm and /usr/bin/java is also symlinked to the 1.7 jvm. /usr/bin appears near the head of my PATH and in fact its the only java on my path. I'm guessing that eclipse must assume that the "best" jvm is the one in /System/Library/Frameworks/JavaVM.framework/Versions/Current or /System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK and that points 1.6.

thanks,

Nick
 Topic: How to link status manager ControlContribution with the view
How to link status manager ControlContribution with the view [message #1058431] Tue, 14 May 2013 01:41
Janusz Dalecki is currently offline Janusz Dalecki
Messages: 44
Registered: January 2010
Location: Sydney
Member
Hi,
I have implemented WorkbenchWindowControlContribution contributing to toolbar:org.eclipse.ui.trim.status (it's just a label displaying a text).
I would like to change the text of the contribution when user presses some button.
I can't figure out how link the contribution with the view.
I have tried to override the setWorkbenchWindow handler of the WorkbenchWindowControlContribution but when it is called my view is not created yet so I can't register any listeners that the contribution could listen to.
Any suggestion?
Regards,
Janusz
 Topic: eclipse crashes by missing JNI_CreateJavaVM symbol windows 8
eclipse crashes by missing JNI_CreateJavaVM symbol windows 8 [message #1058412] Mon, 13 May 2013 23:27
Ashokraj Thangaraj is currently offline Ashokraj Thangaraj
Messages: 2
Registered: May 2013
Junior Member
I got this error 'JVM shared library cannot find JNI_CreateJavaVM symbol'.Thie fix worked for me
1)unzipped the original downloaded eclipse .zip file
2)extracted the zip to a different location. unzipped to root drive(c:\)

opened the eclipse application and it worked fine.

This may fix the problem



Current Time: Sun May 19 05:55:27 EDT 2013

Powered by FUDForum. Page generated in 0.04561 seconds