Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Reference from xxxx will not be updated as the language has not registered an IReferenceUpdater(Reference from xxxx will not be updated as the language has not registered an IReferenceUpdater)
Reference from xxxx will not be updated as the language has not registered an IReferenceUpdater [message #1862783] Fri, 29 December 2023 10:02 Go to next message
David Sun is currently offline David SunFriend
Messages: 45
Registered: July 2020
Member
I Created DSL A and DSL B in xtext.
The DSL B referenced DSL A.
I created a source code file xxx.a in DSL A and a source code file yyy.b in DSL B.

In the xxx.a, I created a variable named "abcd".

In yyy.b, I referenced variable "abcd" from xxx.a.

I renamed variable "abcd" in xxx.a from popup menu "Rename Element".

The xtext showed me a error dialog, saied:
Reference from xxxx will not be updated as the language has not registered an IReferenceUpdater.

How can I implement "Rename Element" function?

Please help me !
Thanks a lot !
  • Attachment: rename.png
    (Size: 25.83KB, Downloaded 56 times)
Re: Reference from xxxx will not be updated as the language has not registered an IReferenceUpdater [message #1862784 is a reply to message #1862783] Fri, 29 December 2023 10:09 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14738
Registered: July 2009
Senior Member
Would be nice how your dsls look like. Do you make use of xtext cross references. If yes it will work ootb

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: Reference from xxxx will not be updated as the language has not registered an IReferenceUpdater [message #1862786 is a reply to message #1862784] Fri, 29 December 2023 11:31 Go to previous messageGo to next message
David Sun is currently offline David SunFriend
Messages: 45
Registered: July 2020
Member
I made use of xtext cross references in my grammar.
index.php/fa/43862/0/
In AbstractGLVDslUiModule.java, the DefaultReferenceUpdater.java was injected.
index.php/fa/43860/0/

The popup menu "Find references" in xtext worked well.
index.php/fa/43861/0/

[Updated on: Fri, 29 December 2023 11:33]

Report message to a moderator

Re: Reference from xxxx will not be updated as the language has not registered an IReferenceUpdater [message #1862788 is a reply to message #1862786] Fri, 29 December 2023 12:06 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14738
Registered: July 2009
Senior Member
Can you please provide a complete minimal reproducer

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: Reference from xxxx will not be updated as the language has not registered an IReferenceUpdater [message #1862789 is a reply to message #1862784] Fri, 29 December 2023 12:07 Go to previous messageGo to next message
David Sun is currently offline David SunFriend
Messages: 45
Registered: July 2020
Member
In instance of OptionalReferenceUpdaterProxy,The referenceUpdater field is null.
index.php/fa/43863/0/
  • Attachment: null.png
    (Size: 89.19KB, Downloaded 346 times)
Re: Reference from xxxx will not be updated as the language has not registered an IReferenceUpdater [message #1862790 is a reply to message #1862789] Fri, 29 December 2023 12:16 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14738
Registered: July 2009
Senior Member
Yes but this should not happen if you register dsls oropetly.
Do you have all dsls in one project?
If yes is plugin.xml_gen generated. If yes did you merge it to plugin.xml


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: Reference from xxxx will not be updated as the language has not registered an IReferenceUpdater [message #1862791 is a reply to message #1862790] Fri, 29 December 2023 12:22 Go to previous messageGo to next message
David Sun is currently offline David SunFriend
Messages: 45
Registered: July 2020
Member
My two DSLs are in two projects.
index.php/fa/43864/0/
  • Attachment: dsls.png
    (Size: 69.46KB, Downloaded 347 times)
Re: Reference from xxxx will not be updated as the language has not registered an IReferenceUpdater [message #1862792 is a reply to message #1862790] Fri, 29 December 2023 12:28 Go to previous messageGo to next message
David Sun is currently offline David SunFriend
Messages: 45
Registered: July 2020
Member
This is my GenerateGLVDsl.mwe2:
index.php/fa/43865/0/
  • Attachment: workflow.png
    (Size: 46.18KB, Downloaded 336 times)
Re: Reference from xxxx will not be updated as the language has not registered an IReferenceUpdater [message #1862793 is a reply to message #1862791] Fri, 29 December 2023 12:28 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14738
Registered: July 2009
Senior Member
Then I really need a reproducer
There is too much stuff / configurations possible


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: Reference from xxxx will not be updated as the language has not registered an IReferenceUpdater [message #1862794 is a reply to message #1862793] Fri, 29 December 2023 12:29 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14738
Registered: July 2009
Senior Member
Can you create two reproducer hello world projects

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: Reference from xxxx will not be updated as the language has not registered an IReferenceUpdater [message #1862795 is a reply to message #1862794] Fri, 29 December 2023 13:09 Go to previous messageGo to next message
David Sun is currently offline David SunFriend
Messages: 45
Registered: July 2020
Member
Can you tell me which configurations may make the referenceUpdater field of OptionalReferenceUpdaterProxy to be null ?
Re: Reference from xxxx will not be updated as the language has not registered an IReferenceUpdater [message #1862796 is a reply to message #1862795] Fri, 29 December 2023 13:22 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14738
Registered: July 2009
Senior Member
Workflow . Modules . Plugin.xml(_gen)
I don't even know if null is an issue there


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: Reference from xxxx will not be updated as the language has not registered an IReferenceUpdater [message #1862797 is a reply to message #1862796] Fri, 29 December 2023 13:27 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14738
Registered: July 2009
Senior Member
Eg the stand-alone setup in workflow looks fishy
You usually use referencedResource inside language to
Refer to other genmodel
I also don't know how file extensions and their casing look like


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
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 Go to previous messageGo to next message
David Sun is currently offline David SunFriend
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 #1862799 is a reply to message #1862798] Fri, 29 December 2023 15:02 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14738
Registered: July 2009
Senior Member
can you please provide the plugin.xml for global.ui
we need to find out why there is no
IResourceServiceProvider or entry here
in ReferenceUpdaterDispatcher
what resourceServiceProvider do you get.
(it is registered via plugin.xml)

if you copy your stuff to a new workspace/projects
do you still see the problem?


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com

[Updated on: Fri, 29 December 2023 15:08]

Report message to a moderator

Re: Reference from xxxx will not be updated as the language has not registered an IReferenceUpdater [message #1862800 is a reply to message #1862799] Fri, 29 December 2023 15:25 Go to previous messageGo to next message
David Sun is currently offline David SunFriend
Messages: 45
Registered: July 2020
Member
plugin.xml in glv.dsl.ui plugin project
<?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="glv"
			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="glv">
		</parser>
	</extension>
	<extension point="org.eclipse.xtext.extension_resourceServiceProvider">
		<resourceServiceProvider
			class="com.abcd.glv.dsl.ui.GLVDslExecutableExtensionFactory:org.eclipse.xtext.ui.resource.IResourceUIServiceProvider"
			uriExtension="glv">
		</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="glv"/>
	</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="glv">
		</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="glv" 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="glv">
		</provider>
	</extension>
	<extension point="org.eclipse.team.core.fileTypes">
		<fileTypes
			extension="glv"
			type="text">
		</fileTypes>
	</extension>
</plugin>

Re: Reference from xxxx will not be updated as the language has not registered an IReferenceUpdater [message #1862801 is a reply to message #1862799] Fri, 29 December 2023 15:28 Go to previous messageGo to next message
David Sun is currently offline David SunFriend
Messages: 45
Registered: July 2020
Member
index.php/fa/43866/0/
Re: Reference from xxxx will not be updated as the language has not registered an IReferenceUpdater [message #1862802 is a reply to message #1862801] Fri, 29 December 2023 15:32 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14738
Registered: July 2009
Senior Member
Yea but I would expect a different class from ui project.

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: Reference from xxxx will not be updated as the language has not registered an IReferenceUpdater [message #1862803 is a reply to message #1862799] Fri, 29 December 2023 15:32 Go to previous messageGo to next message
David Sun is currently offline David SunFriend
Messages: 45
Registered: July 2020
Member
AbstractGLVDslUiModule.java

/*
 * generated by Xtext 2.26.0
 */
package com.abcd.glv.dsl.ui;

import com.google.inject.Binder;
import com.google.inject.Provider;
import com.google.inject.name.Names;
import com.abcd.glv.dsl.ide.contentassist.antlr.GLVDslParser;
import com.abcd.glv.dsl.ide.contentassist.antlr.PartialGLVDslContentAssistParser;
import com.abcd.glv.dsl.ide.contentassist.antlr.internal.InternalGLVDslLexer;
import com.abcd.glv.dsl.ui.contentassist.GLVDslProposalProvider;
import com.abcd.glv.dsl.ui.labeling.GLVDslDescriptionLabelProvider;
import com.abcd.glv.dsl.ui.labeling.GLVDslLabelProvider;
import com.abcd.glv.dsl.ui.outline.GLVDslOutlineTreeProvider;
import com.abcd.glv.dsl.ui.quickfix.GLVDslQuickfixProvider;
import com.abcd.glv.dsl.validation.GLVDslValidatorConfigurationBlock;
import org.eclipse.compare.IViewerCreator;
import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.eclipse.xtext.builder.BuilderParticipant;
import org.eclipse.xtext.builder.EclipseOutputConfigurationProvider;
import org.eclipse.xtext.builder.IXtextBuilderParticipant;
import org.eclipse.xtext.builder.builderState.IBuilderState;
import org.eclipse.xtext.builder.clustering.CurrentDescriptions;
import org.eclipse.xtext.builder.impl.PersistentDataAwareDirtyResource;
import org.eclipse.xtext.builder.nature.NatureAddingEditorCallback;
import org.eclipse.xtext.builder.preferences.BuilderPreferenceAccess;
import org.eclipse.xtext.generator.IContextualOutputConfigurationProvider;
import org.eclipse.xtext.ide.LexerIdeBindings;
import org.eclipse.xtext.ide.editor.contentassist.antlr.IContentAssistParser;
import org.eclipse.xtext.ide.editor.contentassist.antlr.internal.Lexer;
import org.eclipse.xtext.ide.editor.partialEditing.IPartialEditingContentAssistParser;
import org.eclipse.xtext.parser.antlr.AntlrTokenDefProvider;
import org.eclipse.xtext.parser.antlr.ITokenDefProvider;
import org.eclipse.xtext.parser.antlr.LexerProvider;
import org.eclipse.xtext.resource.IResourceDescriptions;
import org.eclipse.xtext.resource.containers.IAllContainersState;
import org.eclipse.xtext.resource.impl.ResourceDescriptionsProvider;
import org.eclipse.xtext.service.SingletonBinding;
import org.eclipse.xtext.ui.DefaultUiModule;
import org.eclipse.xtext.ui.UIBindings;
import org.eclipse.xtext.ui.codetemplates.ui.AccessibleCodetemplatesActivator;
import org.eclipse.xtext.ui.codetemplates.ui.partialEditing.IPartialEditingContentAssistContextFactory;
import org.eclipse.xtext.ui.codetemplates.ui.partialEditing.PartialEditingContentAssistContextFactory;
import org.eclipse.xtext.ui.codetemplates.ui.preferences.AdvancedTemplatesPreferencePage;
import org.eclipse.xtext.ui.codetemplates.ui.preferences.TemplatesLanguageConfiguration;
import org.eclipse.xtext.ui.codetemplates.ui.registry.LanguageRegistrar;
import org.eclipse.xtext.ui.codetemplates.ui.registry.LanguageRegistry;
import org.eclipse.xtext.ui.compare.DefaultViewerCreator;
import org.eclipse.xtext.ui.editor.DocumentBasedDirtyResource;
import org.eclipse.xtext.ui.editor.IXtextEditorCallback;
import org.eclipse.xtext.ui.editor.contentassist.ContentAssistContext;
import org.eclipse.xtext.ui.editor.contentassist.FQNPrefixMatcher;
import org.eclipse.xtext.ui.editor.contentassist.IContentProposalProvider;
import org.eclipse.xtext.ui.editor.contentassist.IProposalConflictHelper;
import org.eclipse.xtext.ui.editor.contentassist.PrefixMatcher;
import org.eclipse.xtext.ui.editor.contentassist.antlr.AntlrProposalConflictHelper;
import org.eclipse.xtext.ui.editor.contentassist.antlr.DelegatingContentAssistContextFactory;
import org.eclipse.xtext.ui.editor.outline.IOutlineTreeProvider;
import org.eclipse.xtext.ui.editor.outline.impl.IOutlineTreeStructureProvider;
import org.eclipse.xtext.ui.editor.preferences.IPreferenceStoreInitializer;
import org.eclipse.xtext.ui.editor.quickfix.IssueResolutionProvider;
import org.eclipse.xtext.ui.editor.templates.XtextTemplatePreferencePage;
import org.eclipse.xtext.ui.refactoring.IDependentElementsCalculator;
import org.eclipse.xtext.ui.refactoring.IReferenceUpdater;
import org.eclipse.xtext.ui.refactoring.IRenameRefactoringProvider;
import org.eclipse.xtext.ui.refactoring.IRenameStrategy;
import org.eclipse.xtext.ui.refactoring.impl.DefaultDependentElementsCalculator;
import org.eclipse.xtext.ui.refactoring.impl.DefaultReferenceUpdater;
import org.eclipse.xtext.ui.refactoring.impl.DefaultRenameRefactoringProvider;
import org.eclipse.xtext.ui.refactoring.impl.DefaultRenameStrategy;
import org.eclipse.xtext.ui.refactoring.ui.DefaultRenameSupport;
import org.eclipse.xtext.ui.refactoring.ui.IRenameSupport;
import org.eclipse.xtext.ui.refactoring.ui.RefactoringPreferences;
import org.eclipse.xtext.ui.resource.ResourceServiceDescriptionLabelProvider;
import org.eclipse.xtext.ui.shared.Access;
import org.eclipse.xtext.ui.validation.AbstractValidatorConfigurationBlock;

/**
 * Manual modifications go to {@link GLVDslUiModule}.
 */
@SuppressWarnings("all")
public abstract class AbstractGLVDslUiModule extends DefaultUiModule {

	public AbstractGLVDslUiModule(AbstractUIPlugin plugin) {
		super(plugin);
	}
	
	// contributed by org.eclipse.xtext.xtext.generator.ImplicitFragment
	public Provider<? extends IAllContainersState> provideIAllContainersState() {
		return Access.getJavaProjectsState();
	}
	
	// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
	public Class<? extends IProposalConflictHelper> bindIProposalConflictHelper() {
		return AntlrProposalConflictHelper.class;
	}
	
	// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
	public void configureContentAssistLexer(Binder binder) {
		binder.bind(Lexer.class)
			.annotatedWith(Names.named(LexerIdeBindings.CONTENT_ASSIST))
			.to(InternalGLVDslLexer.class);
	}
	
	// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
	public void configureHighlightingLexer(Binder binder) {
		binder.bind(org.eclipse.xtext.parser.antlr.Lexer.class)
			.annotatedWith(Names.named(LexerIdeBindings.HIGHLIGHTING))
			.to(com.abcd.glv.dsl.parser.antlr.internal.InternalGLVDslLexer.class);
	}
	
	// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
	public void configureHighlightingTokenDefProvider(Binder binder) {
		binder.bind(ITokenDefProvider.class)
			.annotatedWith(Names.named(LexerIdeBindings.HIGHLIGHTING))
			.to(AntlrTokenDefProvider.class);
	}
	
	// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
	public Class<? extends ContentAssistContext.Factory> bindContentAssistContext$Factory() {
		return DelegatingContentAssistContextFactory.class;
	}
	
	// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
	public Class<? extends IContentAssistParser> bindIContentAssistParser() {
		return GLVDslParser.class;
	}
	
	// contributed by org.eclipse.xtext.xtext.generator.parser.antlr.XtextAntlrGeneratorFragment2
	public void configureContentAssistLexerProvider(Binder binder) {
		binder.bind(InternalGLVDslLexer.class).toProvider(LexerProvider.create(InternalGLVDslLexer.class));
	}
	
	// contributed by org.eclipse.xtext.xtext.generator.validation.ValidatorFragment2
	public Class<? extends AbstractValidatorConfigurationBlock> bindAbstractValidatorConfigurationBlock() {
		return GLVDslValidatorConfigurationBlock.class;
	}
	
	// contributed by org.eclipse.xtext.xtext.generator.exporting.QualifiedNamesFragment2
	public Class<? extends PrefixMatcher> bindPrefixMatcher() {
		return FQNPrefixMatcher.class;
	}
	
	// contributed by org.eclipse.xtext.xtext.generator.exporting.QualifiedNamesFragment2
	public Class<? extends IDependentElementsCalculator> bindIDependentElementsCalculator() {
		return DefaultDependentElementsCalculator.class;
	}
	
	// contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2
	public void configureIResourceDescriptionsBuilderScope(Binder binder) {
		binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.NAMED_BUILDER_SCOPE)).to(CurrentDescriptions.ResourceSetAware.class);
	}
	
	// contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2
	public Class<? extends IXtextEditorCallback> bindIXtextEditorCallback() {
		return NatureAddingEditorCallback.class;
	}
	
	// contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2
	public Class<? extends IContextualOutputConfigurationProvider> bindIContextualOutputConfigurationProvider() {
		return EclipseOutputConfigurationProvider.class;
	}
	
	// contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2
	public void configureIResourceDescriptionsPersisted(Binder binder) {
		binder.bind(IResourceDescriptions.class).annotatedWith(Names.named(ResourceDescriptionsProvider.PERSISTED_DESCRIPTIONS)).to(IBuilderState.class);
	}
	
	// contributed by org.eclipse.xtext.xtext.generator.builder.BuilderIntegrationFragment2
	public Class<? extends DocumentBasedDirtyResource> bindDocumentBasedDirtyResource() {
		return PersistentDataAwareDirtyResource.class;
	}
	
	// contributed by org.eclipse.xtext.xtext.generator.generator.GeneratorFragment2
	public Class<? extends IXtextBuilderParticipant> bindIXtextBuilderParticipant() {
		return BuilderParticipant.class;
	}
	
	// contributed by org.eclipse.xtext.xtext.generator.generator.GeneratorFragment2
	public IWorkspaceRoot bindIWorkspaceRootToInstance() {
		return ResourcesPlugin.getWorkspace().getRoot();
	}
	
	// contributed by org.eclipse.xtext.xtext.generator.generator.GeneratorFragment2
	public void configureBuilderPreferenceStoreInitializer(Binder binder) {
		binder.bind(IPreferenceStoreInitializer.class)
			.annotatedWith(Names.named("builderPreferenceInitializer"))
			.to(BuilderPreferenceAccess.Initializer.class);
	}
	
	// contributed by org.eclipse.xtext.xtext.generator.ui.labeling.LabelProviderFragment2
	public Class<? extends ILabelProvider> bindILabelProvider() {
		return GLVDslLabelProvider.class;
	}
	
	// contributed by org.eclipse.xtext.xtext.generator.ui.labeling.LabelProviderFragment2
	public void configureResourceUIServiceLabelProvider(Binder binder) {
		binder.bind(ILabelProvider.class).annotatedWith(ResourceServiceDescriptionLabelProvider.class).to(GLVDslDescriptionLabelProvider.class);
	}
	
	// contributed by org.eclipse.xtext.xtext.generator.ui.outline.OutlineTreeProviderFragment2
	public Class<? extends IOutlineTreeProvider> bindIOutlineTreeProvider() {
		return GLVDslOutlineTreeProvider.class;
	}
	
	// contributed by org.eclipse.xtext.xtext.generator.ui.outline.OutlineTreeProviderFragment2
	public Class<? extends IOutlineTreeStructureProvider> bindIOutlineTreeStructureProvider() {
		return GLVDslOutlineTreeProvider.class;
	}
	
	// contributed by org.eclipse.xtext.xtext.generator.ui.quickfix.QuickfixProviderFragment2
	public Class<? extends IssueResolutionProvider> bindIssueResolutionProvider() {
		return GLVDslQuickfixProvider.class;
	}
	
	// contributed by org.eclipse.xtext.xtext.generator.ui.contentAssist.ContentAssistFragment2
	public Class<? extends IContentProposalProvider> bindIContentProposalProvider() {
		return GLVDslProposalProvider.class;
	}
	
	// contributed by org.eclipse.xtext.xtext.generator.ui.refactoring.RefactorElementNameFragment2
	public void configureIPreferenceStoreInitializer(Binder binder) {
		binder.bind(IPreferenceStoreInitializer.class)
			.annotatedWith(Names.named("RefactoringPreferences"))
			.to(RefactoringPreferences.Initializer.class);
	}
	
	// contributed by org.eclipse.xtext.xtext.generator.ui.refactoring.RefactorElementNameFragment2
	public Class<? extends IRenameStrategy> bindIRenameStrategy() {
		return DefaultRenameStrategy.class;
	}
	
	// contributed by org.eclipse.xtext.xtext.generator.ui.refactoring.RefactorElementNameFragment2
	public Class<? extends IReferenceUpdater> bindIReferenceUpdater() {
		return DefaultReferenceUpdater.class;
	}
	
	// contributed by org.eclipse.xtext.xtext.generator.ui.refactoring.RefactorElementNameFragment2
	public Class<? extends IRenameRefactoringProvider> bindIRenameRefactoringProvider() {
		return DefaultRenameRefactoringProvider.class;
	}
	
	// contributed by org.eclipse.xtext.xtext.generator.ui.refactoring.RefactorElementNameFragment2
	public Class<? extends IRenameSupport.Factory> bindIRenameSupport$Factory() {
		return DefaultRenameSupport.Factory.class;
	}
	
	// contributed by org.eclipse.xtext.xtext.generator.ui.templates.CodetemplatesGeneratorFragment2
	public Provider<? extends TemplatesLanguageConfiguration> provideTemplatesLanguageConfiguration() {
		return AccessibleCodetemplatesActivator.getTemplatesLanguageConfigurationProvider();
	}
	
	// contributed by org.eclipse.xtext.xtext.generator.ui.templates.CodetemplatesGeneratorFragment2
	public Provider<? extends LanguageRegistry> provideLanguageRegistry() {
		return AccessibleCodetemplatesActivator.getLanguageRegistry();
	}
	
	// contributed by org.eclipse.xtext.xtext.generator.ui.templates.CodetemplatesGeneratorFragment2
	@SingletonBinding(eager=true)
	public Class<? extends LanguageRegistrar> bindLanguageRegistrar() {
		return LanguageRegistrar.class;
	}
	
	// contributed by org.eclipse.xtext.xtext.generator.ui.templates.CodetemplatesGeneratorFragment2
	public Class<? extends XtextTemplatePreferencePage> bindXtextTemplatePreferencePage() {
		return AdvancedTemplatesPreferencePage.class;
	}
	
	// contributed by org.eclipse.xtext.xtext.generator.ui.templates.CodetemplatesGeneratorFragment2
	public Class<? extends IPartialEditingContentAssistParser> bindIPartialEditingContentAssistParser() {
		return PartialGLVDslContentAssistParser.class;
	}
	
	// contributed by org.eclipse.xtext.xtext.generator.ui.templates.CodetemplatesGeneratorFragment2
	public Class<? extends IPartialEditingContentAssistContextFactory> bindIPartialEditingContentAssistContextFactory() {
		return PartialEditingContentAssistContextFactory.class;
	}
	
	// contributed by org.eclipse.xtext.xtext.generator.ui.compare.CompareFragment2
	public Class<? extends IViewerCreator> bindIViewerCreator() {
		return DefaultViewerCreator.class;
	}
	
	// contributed by org.eclipse.xtext.xtext.generator.ui.compare.CompareFragment2
	public void configureCompareViewerTitle(Binder binder) {
		binder.bind(String.class).annotatedWith(Names.named(UIBindings.COMPARE_VIEWER_TITLE)).toInstance("GLVDsl Compare");
	}
	
}

Re: Reference from xxxx will not be updated as the language has not registered an IReferenceUpdater [message #1862804 is a reply to message #1862802] Fri, 29 December 2023 15:33 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14738
Registered: July 2009
Senior Member
<extension point="org.eclipse.xtext.extension_resourceServiceProvider">
<resourceServiceProvider
class="com.abcd.glv.dsl.ui.GLVDslExecutableExtensionFactory:org.eclipse.xtext.ui.resource.IResourceUIServiceProvider"
uriExtension="glv">
</resourceServiceProvider>
</extension>

No global here
Did you really compare with plugin..xml_gen


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
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 Go to previous messageGo to next message
David Sun is currently offline David SunFriend
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

Re: Reference from xxxx will not be updated as the language has not registered an IReferenceUpdater [message #1862806 is a reply to message #1862805] Fri, 29 December 2023 16:03 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14738
Registered: July 2009
Senior Member
Can you please provide reproduction project I can simply import and run. Also with sample model files and what to rename

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: Reference from xxxx will not be updated as the language has not registered an IReferenceUpdater [message #1862807 is a reply to message #1862806] Fri, 29 December 2023 16:30 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14738
Registered: July 2009
Senior Member
(in a fresh hello world project this works perfectly fine)

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: Reference from xxxx will not be updated as the language has not registered an IReferenceUpdater [message #1862808 is a reply to message #1862807] Fri, 29 December 2023 16:46 Go to previous messageGo to next message
David Sun is currently offline David SunFriend
Messages: 45
Registered: July 2020
Member
That was interesting.Can you upload your projects to me ?
Re: Reference from xxxx will not be updated as the language has not registered an IReferenceUpdater [message #1862809 is a reply to message #1862807] Fri, 29 December 2023 16:58 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14738
Registered: July 2009
Senior Member
https://github.com/cdietrich/xtext-two-dsls

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: Reference from xxxx will not be updated as the language has not registered an IReferenceUpdater [message #1862814 is a reply to message #1862809] Sat, 30 December 2023 05:00 Go to previous messageGo to next message
David Sun is currently offline David SunFriend
Messages: 45
Registered: July 2020
Member
I found the reason that the field referenceUpdater in object of OptionalReferenceUpdaterProxy was null.

index.php/fa/43871/0/

In My GLVUtils.class, I created object of GLVDslStandaloneSetup.
index.php/fa/43870/0/
In the register method of GLVDslStandaloneSetup, the following code will regester DefaultResourceServiceProvider.
index.php/fa/43874/0/


I commented out those codes,then the "rename element" worked well.

index.php/fa/43873/0/

Thank you for your help! And Happy New Year!

新年快乐!

[Updated on: Sat, 30 December 2023 05:10]

Report message to a moderator

Re: Reference from xxxx will not be updated as the language has not registered an IReferenceUpdater [message #1862815 is a reply to message #1862814] Sat, 30 December 2023 07:13 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14738
Registered: July 2009
Senior Member
Never ever call stand-alone setup from code that runs in eclipse

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Re: Reference from xxxx will not be updated as the language has not registered an IReferenceUpdater [message #1862816 is a reply to message #1862815] Sat, 30 December 2023 07:16 Go to previous messageGo to next message
David Sun is currently offline David SunFriend
Messages: 45
Registered: July 2020
Member
I need to parse DSL source code file, what do i do ?
Re: Reference from xxxx will not be updated as the language has not registered an IReferenceUpdater [message #1862817 is a reply to message #1862816] Sat, 30 December 2023 07:27 Go to previous messageGo to next message
David Sun is currently offline David SunFriend
Messages: 45
Registered: July 2020
Member
Sorry, I asked chatgpt.It told me how to do .
Thanks a lot !
Re: Reference from xxxx will not be updated as the language has not registered an IReferenceUpdater [message #1862819 is a reply to message #1862817] Sat, 30 December 2023 07:41 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14738
Registered: July 2009
Senior Member
for completeness: http://koehnlein.blogspot.com/2012/11/xtext-tip-how-do-i-get-guice-injector.html

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Day Job: https://www.everest-systems.com
Previous Topic:How do I implement the "Find References" function?
Next Topic:Cross references
Goto Forum:
  


Current Time: Fri Dec 27 01:33:46 GMT 2024

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

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

Back to the top