Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » CTRL+SPCACE for Cross Reference
CTRL+SPCACE for Cross Reference [message #1061598] Mon, 03 June 2013 08:38 Go to next message
junior developer is currently offline junior developerFriend
Messages: 335
Registered: January 2013
Senior Member
Hi all ,

When I enter ctrl +space ,all usable objects get.I want to customize this window.Which class is used for this.such as I load screenshot Contentype parent: cttype2 must not get in this .When I enter ctrl+space ,gets onlly cttype1 and then user will change cttype1.How can I do this.and Which class is used for this problem ?

Best Regards
Re: CTRL+SPCACE for Cross Reference [message #1061602 is a reply to message #1061598] Mon, 03 June 2013 08:52 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 6552
Registered: July 2009
Senior Member
The class is youdslproposalprovider. It calls look up cross
reference. This allows a filter predicate

--
Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext at itemis dot de
Re: CTRL+SPCACE for Cross Reference [message #1061612 is a reply to message #1061602] Mon, 03 June 2013 09:46 Go to previous messageGo to next message
junior developer is currently offline junior developerFriend
Messages: 335
Registered: January 2013
Senior Member
Hi Christian
Thank you

best regards.
Re: CTRL+SPCACE for Cross Reference [message #1061713 is a reply to message #1061612] Mon, 03 June 2013 15:01 Go to previous messageGo to next message
junior developer is currently offline junior developerFriend
Messages: 335
Registered: January 2013
Senior Member
Hi Christian ,

I write java code (util class) with filter predicate.I want to use it .AbstractContentProposalProvider class is Xtend class.I want to call below code in this class.

public static ArrayList<ContentType> getPossibleParentContentType(ContentType content){
		
		Web web = ((Web)((CustomList)content.eContainer()).eContainer());
		while(web.eContainer().eClass().getName().equals("Web")){
			web = (Web) web.eContainer();
		}
		ArrayList<ContentType> allContentTypes = new ArrayList<>();
		
		allContentTypes = returnAllContentTypeFromGivenWeb(web, allContentTypes);
		allContentTypes.remove(content);
		
		return allContentTypes;
	}

Re: CTRL+SPCACE for Cross Reference [message #1061714 is a reply to message #1061612] Mon, 03 June 2013 15:01 Go to previous messageGo to next message
junior developer is currently offline junior developerFriend
Messages: 335
Registered: January 2013
Senior Member
Hi Christian ,

I write java code (util class) with filter predicate.I want to use it .AbstractContentProposalProvider class is Xtend class.I want to call below code in this class.

public static ArrayList<ContentType> getPossibleParentContentType(ContentType content){
		
		Web web = ((Web)((CustomList)content.eContainer()).eContainer());
		while(web.eContainer().eClass().getName().equals("Web")){
			web = (Web) web.eContainer();
		}
		ArrayList<ContentType> allContentTypes = new ArrayList<>();
		
		allContentTypes = returnAllContentTypeFromGivenWeb(web, allContentTypes);
		allContentTypes.remove(content);
		
		return allContentTypes;
	}

Re: CTRL+SPCACE for Cross Reference [message #1061715 is a reply to message #1061612] Mon, 03 June 2013 15:02 Go to previous messageGo to next message
junior developer is currently offline junior developerFriend
Messages: 335
Registered: January 2013
Senior Member
Hi Christian ,

I write java code (util class) with filter predicate.I want to use it .AbstractContentProposalProvider class is Xtend class.I want to call below code in this class.

public static ArrayList<ContentType> getPossibleParentContentType(ContentType content){
		
		Web web = ((Web)((CustomList)content.eContainer()).eContainer());
		while(web.eContainer().eClass().getName().equals("Web")){
			web = (Web) web.eContainer();
		}
		ArrayList<ContentType> allContentTypes = new ArrayList<>();
		
		allContentTypes = returnAllContentTypeFromGivenWeb(web, allContentTypes);
		allContentTypes.remove(content);
		
		return allContentTypes;
	}

Re: CTRL+SPCACE for Cross Reference [message #1061717 is a reply to message #1061612] Mon, 03 June 2013 15:02 Go to previous messageGo to next message
junior developer is currently offline junior developerFriend
Messages: 335
Registered: January 2013
Senior Member
Hi Christian ,

I write java code (util class) with filter predicate.I want to use it .AbstractContentProposalProvider class is Xtend class.I want to call below code in this class.

public static ArrayList<ContentType> getPossibleParentContentType(ContentType content){
		
		Web web = ((Web)((CustomList)content.eContainer()).eContainer());
		while(web.eContainer().eClass().getName().equals("Web")){
			web = (Web) web.eContainer();
		}
		ArrayList<ContentType> allContentTypes = new ArrayList<>();
		
		allContentTypes = returnAllContentTypeFromGivenWeb(web, allContentTypes);
		allContentTypes.remove(content);
		
		return allContentTypes;
	}

Re: CTRL+SPCACE for Cross Reference [message #1061718 is a reply to message #1061602] Mon, 03 June 2013 15:03 Go to previous messageGo to next message
junior developer is currently offline junior developerFriend
Messages: 335
Registered: January 2013
Senior Member
Hi Christian ,

I write java code (util class) with filter predicate.I want to use it .AbstractContentProposalProvider class is Xtend class.I want to call below code in this class.

public static ArrayList<ContentType> getPossibleParentContentType(ContentType content){
		
		Web web = ((Web)((CustomList)content.eContainer()).eContainer());
		while(web.eContainer().eClass().getName().equals("Web")){
			web = (Web) web.eContainer();
		}
		ArrayList<ContentType> allContentTypes = new ArrayList<>();
		
		allContentTypes = returnAllContentTypeFromGivenWeb(web, allContentTypes);
		allContentTypes.remove(content);
		
		return allContentTypes;
	}

Re: CTRL+SPCACE for Cross Reference [message #1061719 is a reply to message #1061602] Mon, 03 June 2013 15:03 Go to previous messageGo to next message
junior developer is currently offline junior developerFriend
Messages: 335
Registered: January 2013
Senior Member
Hi Christian ,

I write java code (util class) with filter predicate.I want to use it .AbstractContentProposalProvider class is Xtend class.I want to call below code in this class.

public static ArrayList<ContentType> getPossibleParentContentType(ContentType content){
		
		Web web = ((Web)((CustomList)content.eContainer()).eContainer());
		while(web.eContainer().eClass().getName().equals("Web")){
			web = (Web) web.eContainer();
		}
		ArrayList<ContentType> allContentTypes = new ArrayList<>();
		
		allContentTypes = returnAllContentTypeFromGivenWeb(web, allContentTypes);
		allContentTypes.remove(content);
		
		return allContentTypes;
	}





Christian Dietrich wrote on Mon, 03 June 2013 04:52
The class is youdslproposalprovider. It calls look up cross
reference. This allows a filter predicate

--
Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext at itemis dot de
Re: CTRL+SPCACE for Cross Reference [message #1061720 is a reply to message #1061602] Mon, 03 June 2013 15:05 Go to previous messageGo to next message
junior developer is currently offline junior developerFriend
Messages: 335
Registered: January 2013
Senior Member
Hi Christian ,

I write java code (util class) with filter predicate.I want to use it .AbstractContentProposalProvider class is Xtend class.I want to call below code in this class.

public static ArrayList<ContentType> getPossibleParentContentType(ContentType content){
		
		Web web = ((Web)((CustomList)content.eContainer()).eContainer());
		while(web.eContainer().eClass().getName().equals("Web")){
			web = (Web) web.eContainer();
		}
		ArrayList<ContentType> allContentTypes = new ArrayList<>();
		
		allContentTypes = returnAllContentTypeFromGivenWeb(web, allContentTypes);
		allContentTypes.remove(content);
		
		return allContentTypes;
	}

Re: CTRL+SPCACE for Cross Reference [message #1061727 is a reply to message #1061720] Mon, 03 June 2013 15:32 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 6552
Registered: July 2009
Senior Member
Sorry this looks you want to customize scoping and not only the
proposals. As always I find it difficult to get your point.

--
Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext at itemis dot de
Re: CTRL+SPCACE for Cross Reference [message #1061794 is a reply to message #1061727] Tue, 04 June 2013 06:01 Go to previous messageGo to next message
junior developer is currently offline junior developerFriend
Messages: 335
Registered: January 2013
Senior Member
Hi Christian,
I examine related examples.but There are a lot of class.do you recommended which class?
I must I use AbstractContentProposalProvider ? or can I use ImportedNamespaceAwareLocalScopeProvider or AbstractDeclarativeScopeProvider?
Hence can I use my util class for this problem ?
Re: CTRL+SPCACE for Cross Reference [message #1061795 is a reply to message #1061794] Tue, 04 June 2013 06:16 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 6552
Registered: July 2009
Senior Member
Please Post a simple example with a hello world grammar with what you want to achive.
There are Tons of scoping Exemples in this forum that might help
And id use the scopeprovider class that is already there or Even
Do this with a Check and Not adopt scoping or proposalprovider at all
Re: CTRL+SPCACE for Cross Reference [message #1061807 is a reply to message #1061720] Tue, 04 June 2013 07:51 Go to previous messageGo to next message
junior developer is currently offline junior developerFriend
Messages: 335
Registered: January 2013
Senior Member
Hi Christian,

I want to use below code because,I sycn GMF and XTEXT.so I wrote util class for use GMF and XTEXT.so I want to use this code for not to do the same procedures
the second time.How can I call my ready code (util class)?




junior developer wrote on Mon, 03 June 2013 11:05
Hi Christian ,

I write java code (util class) with filter predicate.I want to use it .AbstractContentProposalProvider class is Xtend class.I want to call below code in this class.

public static ArrayList<ContentType> getPossibleParentContentType(ContentType content){
		
		Web web = ((Web)((CustomList)content.eContainer()).eContainer());
		while(web.eContainer().eClass().getName().equals("Web")){
			web = (Web) web.eContainer();
		}
		ArrayList<ContentType> allContentTypes = new ArrayList<>();
		
		allContentTypes = returnAllContentTypeFromGivenWeb(web, allContentTypes);
		allContentTypes.remove(content);
		
		return allContentTypes;
	}

Re: CTRL+SPCACE for Cross Reference [message #1061808 is a reply to message #1061807] Tue, 04 June 2013 07:53 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 6552
Registered: July 2009
Senior Member
Adapt scoping

--
Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext at itemis dot de
Re: CTRL+SPCACE for Cross Reference [message #1061810 is a reply to message #1061808] Tue, 04 June 2013 08:07 Go to previous messageGo to next message
junior developer is currently offline junior developerFriend
Messages: 335
Registered: January 2013
Senior Member
Hi ,


AbstractDeclarativeScopeProvider is Xtend class.can I use AbstractDeclarativeScopeProvider?
Re: CTRL+SPCACE for Cross Reference [message #1061811 is a reply to message #1061810] Tue, 04 June 2013 08:09 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 6552
Registered: July 2009
Senior Member
I said: There is already a (empty) scope provider generated by default. use that one.
Re: CTRL+SPCACE for Cross Reference [message #1061820 is a reply to message #1061811] Tue, 04 June 2013 08:53 Go to previous messageGo to next message
junior developer is currently offline junior developerFriend
Messages: 335
Registered: January 2013
Senior Member
Hi ,

I will try .

but I ask one question :

I can Adapt scoping .I examine this example http://20000frames.blogspot.com/2010/09/extending-models-in-xtext-projects.html
If I can understand adapt scoping correctly ,can I use my util class with this way?
Re: CTRL+SPCACE for Cross Reference [message #1061821 is a reply to message #1061820] Tue, 04 June 2013 09:00 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 6552
Registered: July 2009
Senior Member
One thing after another. Don't know what this has todo with scoping

--
Need training, onsite consulting or any other kind of help for Xtext?
Go visit http://xtext.itemis.com or send a mail to xtext at itemis dot de
Previous Topic:Errors after upgrading from Xtext 2.3 to 2.4
Next Topic:Using XCore Model for XText DSL
Goto Forum:
  


Current Time: Mon Dec 22 22:17:22 GMT 2014

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

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