Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » ITEXTEDITOR plugin required bundle(Required bundle)
ITEXTEDITOR plugin required bundle [message #1738032] Fri, 15 July 2016 08:51 Go to next message
Pascal GAUTHIER is currently offline Pascal GAUTHIERFriend
Messages: 1
Registered: July 2016
Junior Member
Hello, I want to use the ITextEditor object included in the package org.eclipse.ui.texteditor

package com.example.e4.rcpapp.commands;

import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IRegion;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.texteditor.ITextEditor;

public class CodeSourceJumpToLine {

	private static void goToLine(IEditorPart editorPart, int LineNumber)
	{
		if (!(editorPart instanceof ITextEditor) || LineNumber <= 0){
			return;
		}
		ITextEditor editor = (ITextEditor) editorPart;
		IDocument document = editor.getDocumentProvider().getDocument(editor.getEditorInput());
		if (document != null)
		{
			IRegion lineInfo = null;
			try {
				lineInfo = document.getLineInformation(LineNumber - 1);
			} catch (org.eclipse.jface.text.BadLocationException e)
			{           
				e.printStackTrace();
			}
			if (lineInfo != null)
			{
				editor.selectAndReveal(lineInfo.getOffset(), lineInfo.getLength());
			}
		}
	}   
}


I have several problems to launch the application :

!SESSION 2016-07-15 10:14:22.935 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.8.0_92
java.vendor=Oracle Corporation
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=fr_FR
Framework arguments:  -product com.example.e4.rcpapp.product -clearPersistedState
Command-line arguments:  -product com.example.e4.rcpapp.product -data /Users/pascaltrabbia/Documents/workspace-sts-3.7.3.RELEASE/../runtime-com.example.e4.rcpapp.product -dev file:/Users/pascaltrabbia/Documents/workspace-sts-3.7.3.RELEASE/.metadata/.plugins/org.eclipse.pde.core/com.example.e4.rcpapp.product/dev.properties -os macosx -ws cocoa -arch x86_64 -consoleLog -clearPersistedState

!ENTRY org.eclipse.ui.workbench.texteditor 4 0 2016-07-15 10:14:23.921
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: org.eclipse.ui.workbench.texteditor [81]
  Unresolved requirement: Require-Bundle: org.eclipse.compare.core; bundle-version="[3.5.0,4.0.0)"

	at org.eclipse.osgi.container.Module.start(Module.java:444)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1620)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1599)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1571)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1514)
	at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
	at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:230)
	at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:340)

!ENTRY org.eclipse.equinox.app 0 0 2016-07-15 10:14:24.502
!MESSAGE Product com.example.e4.rcpapp.product could not be found.

!ENTRY com.example.e4.rcpapp 2 0 2016-07-15 10:14:24.529
!MESSAGE Could not resolve module: com.example.e4.rcpapp [77]
  Unresolved requirement: Import-Package: org.eclipse.ui.texteditor


!ENTRY org.eclipse.ui.workbench.texteditor 2 0 2016-07-15 10:14:24.529
!MESSAGE Could not resolve module: org.eclipse.ui.workbench.texteditor [81]
  Unresolved requirement: Require-Bundle: org.eclipse.compare.core; bundle-version="[3.5.0,4.0.0)"


!ENTRY org.eclipse.osgi 4 0 2016-07-15 10:14:24.530
!MESSAGE Application error
!STACK 1
java.lang.RuntimeException: No application id has been found.
	at org.eclipse.equinox.internal.app.EclipseAppContainer.startDefaultApp(EclipseAppContainer.java:242)
	at org.eclipse.equinox.internal.app.MainApplicationLauncher.run(MainApplicationLauncher.java:29)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:134)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:104)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:388)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:243)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:673)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:610)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1519)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1492)


the plugins org.eclipse.ui.workbench.texteditor, org.eclipse.compare.core and com.example.e4.rcpapp are well added in the list of plug-ins and fragments.
I don't find where is the problem.
Thanks for your help. Have a good day.

Pascal.
Re: ITEXTEDITOR plugin required bundle [message #1738352 is a reply to message #1738032] Tue, 19 July 2016 08:53 Go to previous message
Alexander Nyssen is currently offline Alexander NyssenFriend
Messages: 225
Registered: July 2009
Location: L√ľnen
Senior Member
I think you hit the wrong forum...
Previous Topic:eclipse.org download timeouts
Next Topic:Integrate Editor python in rcp
Goto Forum:
  


Current Time: Tue Nov 21 01:03:40 GMT 2017

Powered by FUDForum. Page generated in 0.01488 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software