Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Xtext Functionality doesnot work when eclipse.ui plugins are supressed(Xtext Functionality doesnot work when eclipse.ui plugins are supressed)
Xtext Functionality doesnot work when eclipse.ui plugins are supressed [message #1276901] Tue, 25 March 2014 07:09 Go to next message
Kunal Khaware is currently offline Kunal KhawareFriend
Messages: 41
Registered: December 2013
Location: Hyderabad,India
Member

Hi,

We have a customised eclipse editor for our needs and suppressed eclipse.ui plugins to add our own functionality.

When we integrate our dsl feature which we developed using xtext 2.2.1 in the customised editor, then we face problem as the content assist is not working as expected ie we had two dependent grammar file which are referred by each other. Hence , the content assist does not show the grammar referred by one grammar when dsl file is closed in editor.

Given below is a main grammar which has reference to subdsls :
=============================================================

grammar abc.Dsl with org.eclipse.xtext.common.Terminals

generate dsl "http://abc/MainDsl"

import "http://abc/SubDsl" as subdsl
=======================================================
Please help!!!

Cheers
Kunal
Re: Xtext Functionality doesnot work when eclipse.ui plugins are supressed [message #1277044 is a reply to message #1276901] Tue, 25 March 2014 12:00 Go to previous messageGo to next message
Sven Efftinge is currently offline Sven EfftingeFriend
Messages: 1823
Registered: July 2009
Senior Member
Hi Kunal,

it is pretty hard (impossible for me) to understand your problem without
a more concrete description.
It's best to provide reproducable steps including real code.

Some particular questions:
- "suppressed eclipse.ui plugins" sounds strange. What did you do?
- xtext 2.2.1? Any chance to upgrade?

Sven

Am 25/03/14 08:09, schrieb Kunal Khaware:
> Hi,
>
> We have a customised eclipse editor for our needs and suppressed
> eclipse.ui plugins to add our own functionality.
>
> When we integrate our dsl feature which we developed using xtext 2.2.1
> in the customised editor, then we face problem as the content assist is
> not working as expected ie we had two dependent grammar file which are
> referred by each other. Hence , the content assist does not show the
> grammar referred by one grammar when dsl file is closed in editor.
>
> Given below is a main grammar which has reference to subdsls :
> =============================================================
>
> grammar abc.Dsl with org.eclipse.xtext.common.Terminals
>
> generate dsl "http://abc/MainDsl"
>
> import "http://abc/SubDsl" as subdsl
> =======================================================
> Please help!!!
>
> Cheers Kunal


--
Need professional support for Xtext or other Eclipse Modeling technologies?
Go to: http://xtext.itemis.com
Twitter : @svenefftinge
Blog : http://blog.efftinge.de
Re: Xtext Functionality doesnot work when eclipse.ui plugins are supressed [message #1278255 is a reply to message #1277044] Thu, 27 March 2014 04:53 Go to previous messageGo to next message
Kunal Khaware is currently offline Kunal KhawareFriend
Messages: 41
Registered: December 2013
Location: Hyderabad,India
Member

Hi, I was able to get rid of the above problem by enabling Build Automatically Option in the Workspace Preference. Is there any way to enable this option from the code.

Appreciate your help!!!

Cheers

Kunal
Re: Xtext Functionality doesnot work when eclipse.ui plugins are supressed [message #1278328 is a reply to message #1278255] Thu, 27 March 2014 07:18 Go to previous messageGo to next message
Kunal Khaware is currently offline Kunal KhawareFriend
Messages: 41
Registered: December 2013
Location: Hyderabad,India
Member

I tried the below all methods but still when i run the product, the Build Automatically option in Windows->Preferences->General->Workspace is disabled.:

Method 1
===========
Added below entry in my plugin_costumization.ini

org.eclipse.core.resources/description.autobuilding=true

Method 2
==============
Added below code in my Application.java of my plugin which executes when workspace is loaded :
IWorkspace workspace= ResourcesPlugin.getWorkspace();
IWorkspaceDescription desc= workspace.getDescription();
boolean isAutoBuilding= desc.isAutoBuilding();
if (isAutoBuilding != true) {
desc.setAutoBuilding(true);
workspace.setDescription(desc);
}

Method 3
=============
Added below code in same above file:
IWorkspaceDescription iwk = ResourcesPlugin.getWorkspace().getDescription();
Preferences preferences = ResourcesPlugin.getPlugin().getPluginPreferences();
preferences.setValue(ResourcesPlugin.PREF_AUTO_BUILDING, true);

Method 4
=====================
Added below code in same file

IWorkspaceDescription iwk = ResourcesPlugin.getWorkspace().getDescription();
iwk.setAutoBuilding(true);


But No Luck Sad

Please help


Regards
Kunal

[Updated on: Thu, 27 March 2014 09:36]

Report message to a moderator

Re: Xtext Functionality doesnot work when eclipse.ui plugins are supressed [message #1279487 is a reply to message #1278255] Fri, 28 March 2014 20:47 Go to previous message
Sven Efftinge is currently offline Sven EfftingeFriend
Messages: 1823
Registered: July 2009
Senior Member
It is enabled by default. Seems like some plug-in is explicitly
disabling it.

Am 27/03/14 05:53, schrieb Kunal Khaware:
> Hi, I was able to get rid of the above problem by enabling Build
> Automatically Option in the Workspace Preference. Is there any way to
> enable this option from the code.
>
> Appreciate your help!!!
>
> Cheers
>
> Kunal


--
Need professional support for Xtext or other Eclipse Modeling technologies?
Go to: http://xtext.itemis.com
Twitter : @svenefftinge
Blog : http://blog.efftinge.de
Previous Topic:How to pass object to the Xtext plugin
Next Topic:Dependency issue
Goto Forum:
  


Current Time: Fri Apr 19 07:38:08 GMT 2024

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

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

Back to the top