Class GenericHyperlink<P extends org.eclipse.emf.ecore.EObject>
- java.lang.Object
-
- org.eclipse.xtext.ui.editor.hyperlinking.AbstractHyperlink
-
- net.ssehub.easy.dslCore.ui.hyperlinking.GenericHyperlink<P>
-
- Type Parameters:
P- the type of the "project", the top-most semantic language unit
- All Implemented Interfaces:
org.eclipse.jface.text.hyperlink.IHyperlink
public class GenericHyperlink<P extends org.eclipse.emf.ecore.EObject> extends org.eclipse.xtext.ui.editor.hyperlinking.AbstractHyperlinkThis class realizes a custom hyperlink that is created for any IVML-element in an IVML-file if the user selects such an element either via pressing the "F3"-key or by clicking on that element while pressing the "CTRL"-key.- Author:
- kroeher
-
-
Field Summary
Fields Modifier and Type Field Description private IHyperlinkFactory<P>factoryprivate org.eclipse.xtext.nodemodel.ILeafNodehyperlinkLeafNodeStores the element for which this hyperlink is created.private PleafNodeProjectStores the IVML-project in which the node of this hyperlink is located in.
-
Constructor Summary
Constructors Constructor Description GenericHyperlink(org.eclipse.xtext.nodemodel.ILeafNode parseTreeElement, P project, IHyperlinkFactory<P> factory)Creates an instance of thisGenericHyperlinkfor the givenILeafNodewhich enables the jump to the element's declaration the node represents.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidopen()Opens an IVML-editor for showing the declaration of the IVML-element this hyperlink was created for.
-
-
-
Field Detail
-
hyperlinkLeafNode
private org.eclipse.xtext.nodemodel.ILeafNode hyperlinkLeafNode
Stores the element for which this hyperlink is created.
-
leafNodeProject
private P extends org.eclipse.emf.ecore.EObject leafNodeProject
Stores the IVML-project in which the node of this hyperlink is located in.
-
factory
private IHyperlinkFactory<P extends org.eclipse.emf.ecore.EObject> factory
-
-
Constructor Detail
-
GenericHyperlink
public GenericHyperlink(org.eclipse.xtext.nodemodel.ILeafNode parseTreeElement, P project, IHyperlinkFactory<P> factory)Creates an instance of thisGenericHyperlinkfor the givenILeafNodewhich enables the jump to the element's declaration the node represents. This is a user visible feature as this hyperlink is shown when the user holds CTRL and points to an element in an IVML-editor.- Parameters:
parseTreeElement- theILeafNodeof the parsed resource for which this hyperlink should be createdproject- theProjectthe given node is located infactory- the creating factory
-
-