|
|
|
|
|
|
|
|
|
|
|
|
|
Re: Reference from xxxx will not be updated as the language has not registered an IReferenceUpdater [message #1862798 is a reply to message #1862797] |
Fri, 29 December 2023 14:42 |
David Sun Messages: 45 Registered: July 2020 |
Member |
|
|
This is my GenerateGLVDsl.mwe2 :
module com.abcd.glv.dsl.GenerateGLVDsl
import org.eclipse.emf.mwe.utils.*
import org.eclipse.xtext.xtext.generator.*
import org.eclipse.xtext.xtext.generator.model.project.*
var rootPath = ".."
Workflow {
bean = StandaloneSetup {
scanClassPath = true
platformUri = rootPath
registerGenModelFile = "platform:/resource/com.abcd.udt.dsl/model/generated/UDTdsl.genmodel"
}
component = XtextGenerator {
configuration = {
project = StandardProjectConfig {
baseName = "com.abcd.glv.dsl"
rootPath = rootPath
runtimeTest = {
enabled = true
}
eclipsePlugin = {
enabled = true
}
eclipsePluginTest = {
enabled = true
}
createEclipseMetaData = true
}
code = {
encoding = "UTF-8"
lineDelimiter = "\r\n"
fileHeader = "/*\n * generated by Xtext \${version}\n */"
preferXtendStubs = false
}
}
language = StandardLanguage {
name = "com.abcd.glv.dsl.GLVDsl"
fileExtensions = "global"
referencedResource = "platform:/resource/com.abcd.udt.dsl/model/generated/UDTdsl.genmodel"
serializer = {
generateStub = false
}
validator = {
// composedCheck = "org.eclipse.xtext.validation.NamesAreUniqueValidator"
// Generates checks for @Deprecated grammar annotations, an IssueProvider and a corresponding PropertyPage
generateDeprecationValidation = true
}
generator = {
generateXtendStub = true
}
junitSupport = {
junitVersion = "5"
}
}
}
}
GenerateUDTdsl.mwe2 file
module com.abcd.udt.GenerateUDTdsl
import org.eclipse.xtext.xtext.generator.*
import org.eclipse.xtext.xtext.generator.model.project.*
var rootPath = ".."
Workflow {
component = XtextGenerator {
configuration = {
project = StandardProjectConfig {
baseName = "com.abcd.udt.dsl"
rootPath = rootPath
runtimeTest = {
enabled = true
}
eclipsePlugin = {
enabled = true
}
eclipsePluginTest = {
enabled = true
}
createEclipseMetaData = true
}
code = {
encoding = "UTF-8"
lineDelimiter = "\r\n"
fileHeader = "/*\n * generated by Xtext \${version}\n */"
preferXtendStubs = false
}
}
language = StandardLanguage {
name = "com.abcd.udt.UDTdsl"
fileExtensions = "udt"
formatter={
generateStub=true
generateXtendStub=true
}
serializer = {
generateStub = false
}
validator = {
// composedCheck = "org.eclipse.xtext.validation.NamesAreUniqueValidator"
// Generates checks for @Deprecated grammar annotations, an IssueProvider and a corresponding PropertyPage
generateDeprecationValidation = true
}
generator = {
generateXtendStub = true
}
junitSupport = {
junitVersion = "5"
}
}
}
}
UDT.xtext
grammar com.abcd.udt.UDTdsl hidden(WS, ML_COMMENT, SL_COMMENT)
import "http://www.eclipse.org/emf/2002/Ecore" as ecore
generate uDTdsl "http://www.xxxxx.com/ide/plc/UDTdsl"
UDT_TYPE_DEF_LIST:
list+=UDT_CUSTOM_TYPE_DEF+
;
UDT_CUSTOM_TYPE_DEF:
{UDT_CUSTOM_TYPE_DEF} 'TYPE'
type_def+=UDT_TYPE_DEF*
'END_TYPE';
UDT_TYPE_DEF:
UDT_ARRAY_TYPE_DEF | UDT_SUB_SET_TYPE_DEF | UDT_ENUM_TYPE_DEF | UDT_DIRECT_TYPE_DEF | UDT_STRUCT_TYPE_DEF;
UDT_ARRAY_TYPE_DEF:
name=ID ':' arrayExp = UDT_ARRAY_EXP end=SEMICOLON;
UDT_ARRAY_EXP:
'ARRAY' '[' value1=subrange_type (',' value2=subrange_type)? ']' 'OF' (pointer_to?=UDT_POINTER_TO)?
(type=UDT_BASIC_TYPE | userDefinedTypeName=ID) (initValue=UDT_VAR_INIT_VALUE)?
;
UDT_ARRAY_EXP2:
'ARRAY' '[' value1=subrange_type (',' value2=subrange_type)? ']' 'OF'
;
subrange_type:
lower=INT upto=UPTO upper=INT;
UDT_SUB_SET_TYPE_DEF:
name=ID ':' dataType+=UDT_BASIC_TYPE '(' lower=INT_WITH_PLUS_MINUS_OPTIONAL upto=UPTO upper=INT_WITH_PLUS_MINUS_OPTIONAL ')' end=SEMICOLON;
UDT_ENUM_TYPE_DEF:
name=ID ':' '(' value+=UDT_FIELD_INIT_VALUE (',' value+=UDT_FIELD_INIT_VALUE)* ')' initValue=UDT_ENUM_INIT_VALUE? end=SEMICOLON;
UDT_FIELD_INIT_VALUE:
name=ID(op=":=" intValue=INT)?
;
UDT_ENUM_INIT_VALUE:
":=" symbol=ID;
UDT_DIRECT_TYPE_DEF:
name=ID ':' dataType=UDT_BASIC_TYPE (':=' initValue+=INT)? end=SEMICOLON;
UDT_STRUCT_TYPE_DEF:
name=ID ':' 'STRUCT'
statements+=UDT_STRUCT_STATEMENT+
'END_STRUCT' (end=SEMICOLON)?;
UDT_STRUCT_STATEMENT:
name=ID ':' ((ref_to?='REF_TO')| (pointer_to?=UDT_POINTER_TO))? (arry=UDT_ARRAY_EXP2)? dataType=(UDT_BASIC_TYPE|UDT_USERDEFINEDTYPENAME) (initValue=UDT_VAR_INIT_VALUE)? (end=SEMICOLON)?;
UDT_USERDEFINEDTYPENAME:
name=ID
;
UDT_POINTER_TO:
pointer="POINTER" to="TO"
;
UDT_BASIC_TYPE:
value=('BIT' | 'BOOL' | 'BYTE' | 'WORD' | 'DWORD' | 'LWORD' | 'SINT' | 'USINT' | 'INT' | 'UINT' | 'DINT' | 'UDINT'
| 'LINT'|'ULINT' | 'REAL' | 'LREAL' | 'STRING' | 'TIME' | 'TIME_OF_DAY' | 'TOD' | 'DATE' | 'DATE_AND_TIME' | 'DT' | 'WSTRING'
| 'ANY' | 'ANY_INT'
| 'ANY_REAL' | 'ANY_NUM' | 'ANY_DATE' | 'ANY_BIT');
UDT_VAR_INIT_VALUE:
op=':=' initValue=(UDT_ONE_DIMENSION_INIT |UDT_TWO_DIMENSION_INIT| UDT_VALUE_EXP | UDT_STRUCT_OR_FB_INIT);
UDT_TWO_DIMENSION_INIT:
'[' valueExp+=UDT_ONE_DIMENSION_INIT(','valueExp+=UDT_ONE_DIMENSION_INIT)* ']'
;
UDT_ONE_DIMENSION_INIT:
'[' valueExp+=( UDT_VALUE_EXP | UDT_STRUCT_OR_FB_INIT)(','valueExp+=(UDT_VALUE_EXP | UDT_STRUCT_OR_FB_INIT))* ']';
UDT_STRUCT_OR_FB_INIT:
leftbrace="(" paramList=UDT_INIT_PARAM_LIST rightbrace=")"
;
UDT_INIT_PARAM_LIST:
in+=UDT_INIT_PARAM (',' (comments+=ML_COMMENT)? in+=UDT_INIT_PARAM)*;
UDT_INIT_PARAM:
(inName=ID ':=' (comments+=ML_COMMENT)?)? exp=(UDT_ONE_DIMENSION_INIT |UDT_TWO_DIMENSION_INIT| UDT_VALUE_EXP | UDT_STRUCT_OR_FB_INIT);
UDT_VALUE_EXP:
(boolValue=('TRUE' | 'FALSE') | idValue=ID | strValue=STRING | intValueWithPlusOrMinus=INT_WITH_PLUS_MINUS |
intValue=INT | timeValue=TIME | todValue=TOD | dateValue=DATE | durationValue=DURATION | dtValue=DT | hexValue=HEX |
octValue=OCT | binaryValue=BINARY | real_value=REAL_NUMBER);
Number hidden():
HEX | (INT | REAL_NUMBER) ('.' (INT | REAL_NUMBER))?;
REAL_NUMBER returns ecore::EBigDecimal hidden():
('-' | '+')? INT '.' (EXT_INT | INT);
terminal EXT_INT:
INT ('e' | 'E') ('-' | '+')? INT;
terminal TIME:
('T#' | 't#') (INT 'h')? (INT 'm')? (INT 's')?;
terminal DATE:
('D#'|'DATE#') INT '-' INT '-' INT;
terminal DURATION:
('T#' | 't#') (INT 'd')? (INT 'h')? (INT 'm')? (INT 's')? (INT (. 'INT')? 'ms')?;
terminal DT:
('DT#'|'DATE_AND_TIME#') INT '-' INT '-' INT '-' INT ':' INT ':' INT '.' INT;
terminal TOD:
('TOD#' |'TIME_OF_DAY#') INT ':' INT ':' INT ('.' INT)?;
terminal HEX:
'16#' ('0'..'9' | 'a'..'f' | 'A'..'F' | '_')+;
terminal OCT:
'8#' ('0'..'8')+
;
terminal BINARY:
'2#' ('0'..'1' | '_')+;
INT_WITH_PLUS_MINUS_OPTIONAL returns ecore::EInt:
('-' | '+')? INT;
INT_WITH_PLUS_MINUS returns ecore::EInt:
('-' | '+') INT;
terminal INT returns ecore::EInt:
'0'..'9' ('0'..'9' | '_')*;
terminal SEMICOLON:
';';
UPTO hidden(WS):
'..';
terminal ID:
'^'? ('\u4E00'..'\u9FA5'|'\uF900'..'\uFA2D'|'a'..'z' | 'A'..'Z' | '_') ('a'..'z' | 'A'..'Z' | '_' | '0'..'9'|'\u4E00'..'\u9FA5'|'\uF900'..'\uFA2D')*;
terminal STRING:
'"' ('\\' . /* 'b'|'t'|'n'|'f'|'r'|'u'|'"'|"'"|'\\' */ | !('\\' | '"'))* '"' |
"'" ('\\' . /* 'b'|'t'|'n'|'f'|'r'|'u'|'"'|"'"|'\\' */ | !('\\' | "'"))* "'";
terminal fragment MLC_OTH:
!('*' | '(' | ')');
terminal fragment MLC_OTH_RP:
!('*' | '(');
terminal fragment MLC_LP_TOK:
'('+ ('*' MLC_BODY | MLC_OTH_RP);
terminal fragment MLC_X_TOK:
'*'+ (MLC_OTH | MLC_LP_TOK);
terminal fragment MLC_BODY:
(MLC_OTH_RP | MLC_LP_TOK | MLC_X_TOK)* '*'+ ')';
terminal ML_COMMENT:
'(*' MLC_BODY;
terminal SL_COMMENT:
'//' !('\n' | '\r')* ('\r'? '\n')?;
terminal WS:
(' ' | '\t' | '\r' | '\n')+;
terminal ANY_OTHER:
.;
GLVDsl.xtext
grammar com.abcd.glv.dsl.GLVDsl hidden(WS, ML_COMMENT, SL_COMMENT)
import "http://www.eclipse.org/emf/2002/Ecore" as ecore
import "platform:/resource/com.abcd.udt.dsl/model/generated/UDTdsl.ecore" as UDT
generate gLVDsl "http://www.xxxxx.com/ide/plc/glv/dsl/GLVDsl"
GLOBAL_VARIABLES:
variables+=GLV_VAR_GLOBAL*
;
GLV_VAR_GLOBAL:
{GLV_VAR_GLOBAL} 'VAR_GLOBAL' (persistent?='PERSISTENT' | retain?='RETAIN' | non_retain?='NON_RETAIN' | constant?='CONSTANT')?
vars+=GLV_VAR_STATEMENT*
'END_VAR';
GLV_VAR_STATEMENT:
GLV_VAR_NAME end=SEMICOLON
;
GLV_VAR_NAME:
(({VAR_WITH_NAME}(name=ID) (loc=LOCATION_MAPPING)?) | {VAR_WITH_LOCATION}(loc=LOCATION_MAPPING)) ':' ((ref_to?='REF_TO') | (pointer_to?=POINTER_TO))? (array=GLV_ARRAY_TYPE)? ((type=GLV_BASIC_TYPE) |
userDefinedTypeName=complextDataType) intValue=GLV_VAR_INIT_VALUE?;
POINTER_TO:
pointer="POINTER" to="TO"
;
complextDataType:
name= [UDT::UDT_TYPE_DEF];
GLV_VAR_INIT_VALUE:
op=':=' initValue=(ONE_DIMENSION_INIT |TWO_DIMENSION_INIT| GLV_VALUE_EXP | STRUCT_OR_FB_INIT);
TWO_DIMENSION_INIT:
'[' valueExp+=ONE_DIMENSION_INIT(','valueExp+=ONE_DIMENSION_INIT)* ']'
;
ONE_DIMENSION_INIT:
'[' valueExp+=(GLV_VALUE_EXP | STRUCT_OR_FB_INIT)(','valueExp+=(GLV_VALUE_EXP | STRUCT_OR_FB_INIT))* ']';
STRUCT_OR_FB_INIT:
leftbrace="(" paramList=INIT_PARAM_LIST rightbrace=")"
;
INIT_PARAM_LIST:
in+=INIT_PARAM (',' (comments+=ML_COMMENT)? in+=INIT_PARAM)*;
INIT_PARAM:
(inName=ID ':=' (comments+=ML_COMMENT)?)? exp=(ONE_DIMENSION_INIT |TWO_DIMENSION_INIT| GLV_VALUE_EXP | STRUCT_OR_FB_INIT);
GLV_VALUE_EXP:
(boolValue=('TRUE' | 'FALSE') | idValue=ID | strValue=STRING | intValueWithPlusOrMinus=INT_WITH_PLUS_MINUS |
intValue=INT | timeValue=TIME | todValue=TOD | dateValue=DATE | durationValue=DURATION | dtValue=DT | hexValue=HEX |
octValue=OCT | binaryValue=BINARY | real_value=REAL_NUMBER);
LOCATION_MAPPING:
'AT' LOCATION;
GLV_ARRAY_TYPE hidden(WS):
'ARRAY' '[' dimension=DIMENSION ']' 'OF';
DIMENSION:
dimension+=subrange_type (',' dimension+=subrange_type)*;
subrange_type:
lower=INT upto=UPTO upper=INT;
terminal SEMICOLON:
';';
GLV_BASIC_TYPE:
value=('BIT' | 'BOOL' | 'BYTE' | 'WORD' | 'DWORD' | 'LWORD' | 'SINT' | 'USINT' | 'INT' | 'UINT' | 'DINT' | 'UDINT'
| 'LINT' | 'REAL' | 'LREAL' | 'STRING' | 'TIME' | 'TIME_OF_DAY' | 'TOD' | 'DATE' | 'DATE_AND_TIME' | 'DT' | 'WSTRING'
| 'ANY' | 'ANY_INT'
| 'ANY_REAL' | 'ANY_NUM' | 'ANY_DATE' | 'ANY_BIT');
terminal TIME:
('T#' | 't#') (INT 'h')? (INT 'm')? (INT 's')?;
terminal DATE:
('d#'|'D#') INT '-' INT '-' INT;
terminal DURATION:
('T#' | 't#') (INT 'd')? (INT 'h')? (INT 'm')? (INT 's')? (INT (. 'INT')? 'ms')?;
terminal DT:
('dt#'|'DT#') INT '-' INT '-' INT '-' INT ':' INT ':' INT ('.' INT)?;
terminal TOD:
('tod#'|'TOD#') INT ':' INT ':' INT ('.' INT)?;
terminal HEX:
'16#' ('0'..'9' | 'a'..'f' | 'A'..'F' | '_')+;
terminal BINARY:
'2#' ('0'..'1' | '_')+;
INT_WITH_PLUS_MINUS returns ecore::EIntegerObject:
'-' INT;
terminal INT returns ecore::EIntegerObject:
'0'..'9' ('0'..'9' | '_')*;
REAL_NUMBER returns ecore::EBigDecimal hidden():
('-' | '+')? INT '.' (EXT_INT | INT);
terminal EXT_INT:
INT ('e' | 'E') ('-' | '+')? INT;
terminal OCT:
'8#' ('0'..'8')+
;
UPTO hidden(WS):
'..';
terminal LOCATION:
'%' ('I' | 'Q' | 'M') (('*') | ('X' | 'B' | 'W' | 'D' | 'L')? ('0'..'9')+ (('.') ('0'..'9')+)?);
terminal ID:
'^'? ('\u4E00'..'\u9FA5'|'\uF900'..'\uFA2D'|'a'..'z' | 'A'..'Z' | '_') ('a'..'z' | 'A'..'Z' | '_' | '0'..'9'|'\u4E00'..'\u9FA5'|'\uF900'..'\uFA2D')*;
terminal STRING:
'"' ('\\' . /* 'b'|'t'|'n'|'f'|'r'|'u'|'"'|"'"|'\\' */ | !('\\' | '"'))* '"' |
"'" ('\\' . /* 'b'|'t'|'n'|'f'|'r'|'u'|'"'|"'"|'\\' */ | !('\\' | "'"))* "'";
terminal fragment MLC_OTH:
!('*' | '(' | ')');
terminal fragment MLC_OTH_RP:
!('*' | '(');
terminal fragment MLC_LP_TOK:
'('+ ('*' MLC_BODY | MLC_OTH_RP);
terminal fragment MLC_X_TOK:
'*'+ (MLC_OTH | MLC_LP_TOK);
terminal fragment MLC_BODY:
(MLC_OTH_RP | MLC_LP_TOK | MLC_X_TOK)* '*'+ ')';
terminal ML_COMMENT:
'(*' MLC_BODY;
terminal SL_COMMENT:
'//' !('\n' | '\r')* ('\r'? '\n')?;
terminal WS:
(' ' | '\t' | '\r' | '\n')+;
terminal ANY_OTHER:
.;
|
|
|
|
|
|
|
|
|
Re: Reference from xxxx will not be updated as the language has not registered an IReferenceUpdater [message #1862805 is a reply to message #1862804] |
Fri, 29 December 2023 15:48 |
David Sun Messages: 45 Registered: July 2020 |
Member |
|
|
I synchronized plugin.xml_gen and plugin.xml。
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.0"?>
<plugin>
<extension
point="org.eclipse.ui.editors">
<editor
class="com.abcd.glv.dsl.ui.GLVDslExecutableExtensionFactory:org.eclipse.xtext.ui.editor.XtextEditor"
contributorClass="org.eclipse.ui.editors.text.TextEditorActionContributor"
default="true"
extensions="global"
icon="icons/GlobalVar.gif"
id="com.abcd.glv.dsl.GLVDsl"
name="GLVDsl Editor">
</editor>
</extension>
<extension
point="org.eclipse.ui.handlers">
<handler
class="com.abcd.glv.dsl.ui.GLVDslExecutableExtensionFactory:org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclarationHandler"
commandId="org.eclipse.xtext.ui.editor.hyperlinking.OpenDeclaration">
<activeWhen>
<reference
definitionId="com.abcd.glv.dsl.GLVDsl.Editor.opened">
</reference>
</activeWhen>
</handler>
<handler
class="com.abcd.glv.dsl.ui.GLVDslExecutableExtensionFactory:org.eclipse.xtext.ui.editor.handler.ValidateActionHandler"
commandId="com.abcd.glv.dsl.GLVDsl.validate">
<activeWhen>
<reference
definitionId="com.abcd.glv.dsl.GLVDsl.Editor.opened">
</reference>
</activeWhen>
</handler>
<!-- copy qualified name -->
<handler
class="com.abcd.glv.dsl.ui.GLVDslExecutableExtensionFactory:org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedNameHandler"
commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName">
<activeWhen>
<reference definitionId="com.abcd.glv.dsl.GLVDsl.Editor.opened" />
</activeWhen>
</handler>
<handler
class="com.abcd.glv.dsl.ui.GLVDslExecutableExtensionFactory:org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedNameHandler"
commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedName">
<activeWhen>
<and>
<reference definitionId="com.abcd.glv.dsl.GLVDsl.XtextEditor.opened" />
<iterate>
<adapt type="org.eclipse.xtext.ui.editor.outline.IOutlineNode" />
</iterate>
</and>
</activeWhen>
</handler>
</extension>
<extension point="org.eclipse.core.expressions.definitions">
<definition id="com.abcd.glv.dsl.GLVDsl.Editor.opened">
<and>
<reference definitionId="isActiveEditorAnInstanceOfXtextEditor"/>
<with variable="activeEditor">
<test property="org.eclipse.xtext.ui.editor.XtextEditor.languageName"
value="com.abcd.glv.dsl.GLVDsl"
forcePluginActivation="true"/>
</with>
</and>
</definition>
<definition id="com.abcd.glv.dsl.GLVDsl.XtextEditor.opened">
<and>
<reference definitionId="isXtextEditorActive"/>
<with variable="activeEditor">
<test property="org.eclipse.xtext.ui.editor.XtextEditor.languageName"
value="com.abcd.glv.dsl.GLVDsl"
forcePluginActivation="true"/>
</with>
</and>
</definition>
</extension>
<extension
point="org.eclipse.ui.preferencePages">
<page
class="com.abcd.glv.dsl.ui.GLVDslExecutableExtensionFactory:org.eclipse.xtext.ui.editor.preferences.LanguageRootPreferencePage"
id="com.abcd.glv.dsl.GLVDsl"
name="GLVDsl">
<keywordReference id="com.abcd.glv.dsl.ui.keyword_GLVDsl"/>
</page>
<page
category="com.abcd.glv.dsl.GLVDsl"
class="com.abcd.glv.dsl.ui.GLVDslExecutableExtensionFactory:org.eclipse.xtext.ui.editor.syntaxcoloring.SyntaxColoringPreferencePage"
id="com.abcd.glv.dsl.GLVDsl.coloring"
name="Syntax Coloring">
<keywordReference id="com.abcd.glv.dsl.ui.keyword_GLVDsl"/>
</page>
<page
category="com.abcd.glv.dsl.GLVDsl"
class="com.abcd.glv.dsl.ui.GLVDslExecutableExtensionFactory:org.eclipse.xtext.ui.editor.templates.XtextTemplatePreferencePage"
id="com.abcd.glv.dsl.GLVDsl.templates"
name="Templates">
<keywordReference id="com.abcd.glv.dsl.ui.keyword_GLVDsl"/>
</page>
</extension>
<extension
point="org.eclipse.ui.propertyPages">
<page
class="com.abcd.glv.dsl.ui.GLVDslExecutableExtensionFactory:org.eclipse.xtext.ui.editor.preferences.LanguageRootPreferencePage"
id="com.abcd.glv.dsl.GLVDsl"
name="GLVDsl">
<keywordReference id="com.abcd.glv.dsl.ui.keyword_GLVDsl"/>
<enabledWhen>
<adapt type="org.eclipse.core.resources.IProject"/>
</enabledWhen>
<filter name="projectNature" value="org.eclipse.xtext.ui.shared.xtextNature"/>
</page>
</extension>
<extension
point="org.eclipse.ui.keywords">
<keyword
id="com.abcd.glv.dsl.ui.keyword_GLVDsl"
label="GLVDsl"/>
</extension>
<extension
point="org.eclipse.ui.commands">
<command
description="Trigger expensive validation"
id="com.abcd.glv.dsl.GLVDsl.validate"
name="Validate">
</command>
<!-- copy qualified name -->
<command
id="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName"
categoryId="org.eclipse.ui.category.edit"
description="Copy the qualified name for the selected element"
name="Copy Qualified Name">
</command>
<command
id="org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedName"
categoryId="org.eclipse.ui.category.edit"
description="Copy the qualified name for the selected element"
name="Copy Qualified Name">
</command>
</extension>
<extension point="org.eclipse.ui.menus">
<menuContribution
locationURI="popup:#TextEditorContext?after=group.edit">
<command
commandId="com.abcd.glv.dsl.GLVDsl.validate"
style="push"
tooltip="Trigger expensive validation">
<visibleWhen checkEnabled="false">
<reference
definitionId="com.abcd.glv.dsl.GLVDsl.Editor.opened">
</reference>
</visibleWhen>
</command>
</menuContribution>
<!-- copy qualified name -->
<menuContribution locationURI="popup:#TextEditorContext?after=copy">
<command commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName"
style="push" tooltip="Copy Qualified Name">
<visibleWhen checkEnabled="false">
<reference definitionId="com.abcd.glv.dsl.GLVDsl.Editor.opened" />
</visibleWhen>
</command>
</menuContribution>
<menuContribution locationURI="menu:edit?after=copy">
<command commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.EditorCopyQualifiedName"
style="push" tooltip="Copy Qualified Name">
<visibleWhen checkEnabled="false">
<reference definitionId="com.abcd.glv.dsl.GLVDsl.Editor.opened" />
</visibleWhen>
</command>
</menuContribution>
<menuContribution locationURI="popup:org.eclipse.xtext.ui.outline?after=additions">
<command commandId="org.eclipse.xtext.ui.editor.copyqualifiedname.OutlineCopyQualifiedName"
style="push" tooltip="Copy Qualified Name">
<visibleWhen checkEnabled="false">
<and>
<reference definitionId="com.abcd.glv.dsl.GLVDsl.XtextEditor.opened" />
<iterate>
<adapt type="org.eclipse.xtext.ui.editor.outline.IOutlineNode" />
</iterate>
</and>
</visibleWhen>
</command>
</menuContribution>
</extension>
<extension point="org.eclipse.ui.menus">
<menuContribution locationURI="popup:#TextEditorContext?endof=group.find">
<command commandId="org.eclipse.xtext.ui.editor.FindReferences">
<visibleWhen checkEnabled="false">
<reference definitionId="com.abcd.glv.dsl.GLVDsl.Editor.opened">
</reference>
</visibleWhen>
</command>
</menuContribution>
</extension>
<extension point="org.eclipse.ui.handlers">
<handler
class="com.abcd.glv.dsl.ui.GLVDslExecutableExtensionFactory:org.eclipse.xtext.ui.editor.findrefs.FindReferencesHandler"
commandId="org.eclipse.xtext.ui.editor.FindReferences">
<activeWhen>
<reference
definitionId="com.abcd.glv.dsl.GLVDsl.Editor.opened">
</reference>
</activeWhen>
</handler>
</extension>
<extension point="org.eclipse.core.contenttype.contentTypes">
<content-type
base-type="org.eclipse.core.runtime.text"
file-extensions="global"
id="com.abcd.glv.dsl.GLVDsl.contenttype"
name="GLVDsl File"
priority="normal">
</content-type>
</extension>
<!-- adding resource factories -->
<extension
point="org.eclipse.emf.ecore.extension_parser">
<parser
class="com.abcd.glv.dsl.ui.GLVDslExecutableExtensionFactory:org.eclipse.xtext.resource.IResourceFactory"
type="global">
</parser>
</extension>
<extension point="org.eclipse.xtext.extension_resourceServiceProvider">
<resourceServiceProvider
class="com.abcd.glv.dsl.ui.GLVDslExecutableExtensionFactory:org.eclipse.xtext.ui.resource.IResourceUIServiceProvider"
uriExtension="global">
</resourceServiceProvider>
</extension>
<!-- marker definitions for com.abcd.glv.dsl.GLVDsl -->
<extension
id="glvdsl.check.fast"
name="GLVDsl Problem"
point="org.eclipse.core.resources.markers">
<super type="org.eclipse.xtext.ui.check.fast"/>
<persistent value="true"/>
</extension>
<extension
id="glvdsl.check.normal"
name="GLVDsl Problem"
point="org.eclipse.core.resources.markers">
<super type="org.eclipse.xtext.ui.check.normal"/>
<persistent value="true"/>
</extension>
<extension
id="glvdsl.check.expensive"
name="GLVDsl Problem"
point="org.eclipse.core.resources.markers">
<super type="org.eclipse.xtext.ui.check.expensive"/>
<persistent value="true"/>
</extension>
<extension point="org.eclipse.ui.preferencePages">
<page
category="com.abcd.glv.dsl.GLVDsl"
class="com.abcd.glv.dsl.ui.GLVDslExecutableExtensionFactory:org.eclipse.xtext.ui.validation.ValidatorPreferencePage"
id="com.abcd.glv.dsl.GLVDsl.validator.preferencePage"
name="Errors/Warnings">
<keywordReference id="com.abcd.glv.dsl.ui.keyword_GLVDsl"/>
</page>
</extension>
<extension point="org.eclipse.xtext.builder.participant">
<participant
class="com.abcd.glv.dsl.ui.GLVDslExecutableExtensionFactory:org.eclipse.xtext.builder.IXtextBuilderParticipant"
fileExtensions="global"/>
</extension>
<extension point="org.eclipse.ui.preferencePages">
<page
category="com.abcd.glv.dsl.GLVDsl"
class="com.abcd.glv.dsl.ui.GLVDslExecutableExtensionFactory:org.eclipse.xtext.builder.preferences.BuilderPreferencePage"
id="com.abcd.glv.dsl.GLVDsl.compiler.preferencePage"
name="Compiler">
<keywordReference id="com.abcd.glv.dsl.ui.keyword_GLVDsl"/>
</page>
</extension>
<extension point="org.eclipse.ui.propertyPages">
<page
category="com.abcd.glv.dsl.GLVDsl"
class="com.abcd.glv.dsl.ui.GLVDslExecutableExtensionFactory:org.eclipse.xtext.builder.preferences.BuilderPreferencePage"
id="com.abcd.glv.dsl.GLVDsl.compiler.propertyPage"
name="Compiler">
<keywordReference id="com.abcd.glv.dsl.ui.keyword_GLVDsl"/>
<enabledWhen>
<adapt type="org.eclipse.core.resources.IProject"/>
</enabledWhen>
<filter name="projectNature" value="org.eclipse.xtext.ui.shared.xtextNature"/>
</page>
</extension>
<extension point="org.eclipse.ui.menus">
<menuContribution locationURI="popup:#TextEditorContext?after=xtext.ui.openDeclaration">
<command
commandId="org.eclipse.xtext.ui.OpenGeneratedFileCommand"
id="com.abcd.glv.dsl.GLVDsl.OpenGeneratedCode"
style="push">
<visibleWhen checkEnabled="false">
<reference definitionId="com.abcd.glv.dsl.GLVDsl.Editor.opened" />
</visibleWhen>
</command>
</menuContribution>
</extension>
<extension point="org.eclipse.ui.handlers">
<handler
class="com.abcd.glv.dsl.ui.GLVDslExecutableExtensionFactory:org.eclipse.xtext.ui.generator.trace.OpenGeneratedFileHandler"
commandId="org.eclipse.xtext.ui.OpenGeneratedFileCommand">
<activeWhen>
<reference definitionId="com.abcd.glv.dsl.GLVDsl.Editor.opened" />
</activeWhen>
</handler>
</extension>
<!-- Quick Outline -->
<extension
point="org.eclipse.ui.handlers">
<handler
class="com.abcd.glv.dsl.ui.GLVDslExecutableExtensionFactory:org.eclipse.xtext.ui.editor.outline.quickoutline.ShowQuickOutlineActionHandler"
commandId="org.eclipse.xtext.ui.editor.outline.QuickOutline">
<activeWhen>
<reference
definitionId="com.abcd.glv.dsl.GLVDsl.Editor.opened">
</reference>
</activeWhen>
</handler>
</extension>
<extension
point="org.eclipse.ui.commands">
<command
description="Open the quick outline."
id="org.eclipse.xtext.ui.editor.outline.QuickOutline"
name="Quick Outline">
</command>
</extension>
<extension point="org.eclipse.ui.menus">
<menuContribution
locationURI="popup:#TextEditorContext?after=group.open">
<command commandId="org.eclipse.xtext.ui.editor.outline.QuickOutline"
style="push"
tooltip="Open Quick Outline">
<visibleWhen checkEnabled="false">
<reference definitionId="com.abcd.glv.dsl.GLVDsl.Editor.opened"/>
</visibleWhen>
</command>
</menuContribution>
</extension>
<!-- quickfix marker resolution generator for com.abcd.glv.dsl.GLVDsl -->
<extension
point="org.eclipse.ui.ide.markerResolution">
<markerResolutionGenerator
class="com.abcd.glv.dsl.ui.GLVDslExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator"
markerType="com.abcd.glv.dsl.ui.glvdsl.check.fast">
<attribute
name="FIXABLE_KEY"
value="true">
</attribute>
</markerResolutionGenerator>
<markerResolutionGenerator
class="com.abcd.glv.dsl.ui.GLVDslExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator"
markerType="com.abcd.glv.dsl.ui.glvdsl.check.normal">
<attribute
name="FIXABLE_KEY"
value="true">
</attribute>
</markerResolutionGenerator>
<markerResolutionGenerator
class="com.abcd.glv.dsl.ui.GLVDslExecutableExtensionFactory:org.eclipse.xtext.ui.editor.quickfix.MarkerResolutionGenerator"
markerType="com.abcd.glv.dsl.ui.glvdsl.check.expensive">
<attribute
name="FIXABLE_KEY"
value="true">
</attribute>
</markerResolutionGenerator>
</extension>
<!-- Rename Refactoring -->
<extension point="org.eclipse.ui.handlers">
<handler
class="com.abcd.glv.dsl.ui.GLVDslExecutableExtensionFactory:org.eclipse.xtext.ui.refactoring.ui.DefaultRenameElementHandler"
commandId="org.eclipse.xtext.ui.refactoring.RenameElement">
<activeWhen>
<reference
definitionId="com.abcd.glv.dsl.GLVDsl.Editor.opened">
</reference>
</activeWhen>
</handler>
</extension>
<extension point="org.eclipse.ui.menus">
<menuContribution
locationURI="popup:#TextEditorContext?after=group.edit">
<command commandId="org.eclipse.xtext.ui.refactoring.RenameElement"
style="push">
<visibleWhen checkEnabled="false">
<reference
definitionId="com.abcd.glv.dsl.GLVDsl.Editor.opened">
</reference>
</visibleWhen>
</command>
</menuContribution>
</extension>
<extension point="org.eclipse.ui.preferencePages">
<page
category="com.abcd.glv.dsl.GLVDsl"
class="com.abcd.glv.dsl.ui.GLVDslExecutableExtensionFactory:org.eclipse.xtext.ui.refactoring.ui.RefactoringPreferencePage"
id="com.abcd.glv.dsl.GLVDsl.refactoring"
name="Refactoring">
<keywordReference id="com.abcd.glv.dsl.ui.keyword_GLVDsl"/>
</page>
</extension>
<extension point="org.eclipse.compare.contentViewers">
<viewer id="com.abcd.glv.dsl.GLVDsl.compare.contentViewers"
class="com.abcd.glv.dsl.ui.GLVDslExecutableExtensionFactory:org.eclipse.xtext.ui.compare.InjectableViewerCreator"
extensions="global">
</viewer>
<contentTypeBinding
contentTypeId="com.abcd.glv.dsl.GLVDsl.contenttype"
contentViewerId="com.abcd.glv.dsl.GLVDsl.compare.contentViewers" />
</extension>
<extension point="org.eclipse.compare.contentMergeViewers">
<viewer id="com.abcd.glv.dsl.GLVDsl.compare.contentMergeViewers"
class="com.abcd.glv.dsl.ui.GLVDslExecutableExtensionFactory:org.eclipse.xtext.ui.compare.InjectableViewerCreator"
extensions="global" label="GLVDsl Compare">
</viewer>
<contentTypeBinding
contentTypeId="com.abcd.glv.dsl.GLVDsl.contenttype"
contentMergeViewerId="com.abcd.glv.dsl.GLVDsl.compare.contentMergeViewers" />
</extension>
<extension point="org.eclipse.ui.editors.documentProviders">
<provider id="com.abcd.glv.dsl.GLVDsl.editors.documentProviders"
class="com.abcd.glv.dsl.ui.GLVDslExecutableExtensionFactory:org.eclipse.xtext.ui.editor.model.XtextDocumentProvider"
extensions="global">
</provider>
</extension>
<extension point="org.eclipse.team.core.fileTypes">
<fileTypes
extension="global"
type="text">
</fileTypes>
</extension>
</plugin>
But the referenceUpdater filed in OptionalReferenceUpdaterProxy is still null.
[Updated on: Fri, 29 December 2023 15:50] Report message to a moderator
|
|
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05906 seconds