Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » port existing Eclipse Plugin to Intellij(port existing Eclipse Plugin to Intellij)
icon9.gif  port existing Eclipse Plugin to Intellij [message #1725770] Mon, 07 March 2016 14:30 Go to next message
Sam Razialruh is currently offline Sam RazialruhFriend
Messages: 7
Registered: March 2016
Junior Member
Hello,

we have created a plugin (drop-in) for Eclipse for our own DSL.
I try to port this plugin for usage in IntelliJ.

I already setup the project and i am able to create a "ideaZip" (IntelliJ Plugin Package)
my project also recognizes the dsl files and offers code-completion.

but within this dsl, there are also links to other dsl files, but intellij show me an error. Intellij does not recognize the object, which is defined in the other dsl file.

how can i make it possible, to use navigation to and recognition of objects?

sam
Re: port existing Eclipse Plugin to Intellij [message #1725791 is a reply to message #1725770] Mon, 07 March 2016 16:53 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13724
Registered: July 2009
Senior Member
Make sure the model project has the mydsl facet

(File menu -> project structure)


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: port existing Eclipse Plugin to Intellij [message #1735755 is a reply to message #1725791] Wed, 22 June 2016 13:23 Go to previous messageGo to next message
Sam Razialruh is currently offline Sam RazialruhFriend
Messages: 7
Registered: March 2016
Junior Member
Hi,

i tried to add the facet, but it does not help.
added you on "Xing", so we can talk there.

Wir sind ja immerhin beides Stuttgarter Smile

Sam
Re: port existing Eclipse Plugin to Intellij [message #1735791 is a reply to message #1735755] Wed, 22 June 2016 18:07 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13724
Registered: July 2009
Senior Member
here is the iml for my test project. as you can see i have the facets for both dsls added

<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
  <component name="FacetManager">
    <facet type="org.xtext.example.mydsla.MyDslA" name="MyDslA">
      <configuration>
        <option name="activated" value="true" />
        <option name="createDirectory" value="true" />
        <option name="outputDirectory" value="src-gen" />
        <option name="overwriteExisting" value="true" />
        <option name="testOutputDirectory" value="src-gen" />
      </configuration>
    </facet>
    <facet type="org.xtext.example.mydslb.MyDslB" name="MyDslB">
      <configuration>
        <option name="activated" value="true" />
        <option name="createDirectory" value="true" />
        <option name="outputDirectory" value="src-gen" />
        <option name="overwriteExisting" value="true" />
        <option name="testOutputDirectory" value="src-gen" />
      </configuration>
    </facet>
  </component>
  <component name="NewModuleRootManager" inherit-compiler-output="true">
    <exclude-output />
    <content url="file://$MODULE_DIR$">
      <sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
    </content>
    <orderEntry type="inheritedJdk" />
    <orderEntry type="sourceFolder" forTests="false" />
  </component>
</module>


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: port existing Eclipse Plugin to Intellij [message #1735831 is a reply to message #1735791] Thu, 23 June 2016 07:19 Go to previous messageGo to next message
Sam Razialruh is currently offline Sam RazialruhFriend
Messages: 7
Registered: March 2016
Junior Member
i do not have two facets, i have one facets and many modules.
i want the modules to recognizes each others dsl-files.

i uploaded my example-project, there you can see my problem.

[Updated on: Thu, 23 June 2016 08:57]

Report message to a moderator

Re: port existing Eclipse Plugin to Intellij [message #1735833 is a reply to message #1735831] Thu, 23 June 2016 07:35 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13724
Registered: July 2009
Senior Member
where do i find the plugins?

Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: port existing Eclipse Plugin to Intellij [message #1735835 is a reply to message #1735833] Thu, 23 June 2016 07:52 Go to previous messageGo to next message
Sam Razialruh is currently offline Sam RazialruhFriend
Messages: 7
Registered: March 2016
Junior Member
it is inside the zip file within the folder "___intellij-home-config-plugins"
Re: port existing Eclipse Plugin to Intellij [message #1735842 is a reply to message #1735835] Thu, 23 June 2016 08:48 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13724
Registered: July 2009
Senior Member
i had a look with a mydsl and inter module refs work.

in your case i get referencing errors already inside the base file.
it looks like it has to do with naming.

besides this i dont know how a propery maven setup looks like in intellij,
but if i put a java class into base and try to reference it from data it cannot find the java file as well.


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: port existing Eclipse Plugin to Intellij [message #1735844 is a reply to message #1735842] Thu, 23 June 2016 09:08 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13724
Registered: July 2009
Senior Member
p.s. i fixed the poms,
now i can refer from data to base


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: port existing Eclipse Plugin to Intellij [message #1735848 is a reply to message #1735842] Thu, 23 June 2016 09:23 Go to previous messageGo to next message
Sam Razialruh is currently offline Sam RazialruhFriend
Messages: 7
Registered: March 2016
Junior Member
i fixed the example-project
Re: port existing Eclipse Plugin to Intellij [message #1735853 is a reply to message #1735848] Thu, 23 June 2016 09:54 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13724
Registered: July 2009
Senior Member
as i said: i have no idea how maven behaves in idea.
i created a new project and rebuilt your structure and it seems to work.



Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: port existing Eclipse Plugin to Intellij [message #1735873 is a reply to message #1735853] Thu, 23 June 2016 12:07 Go to previous messageGo to next message
Sam Razialruh is currently offline Sam RazialruhFriend
Messages: 7
Registered: March 2016
Junior Member
do you think it has to do something with the "parent" entries, which i did not have?
Re: port existing Eclipse Plugin to Intellij [message #1735874 is a reply to message #1735842] Thu, 23 June 2016 12:11 Go to previous messageGo to next message
Sam Razialruh is currently offline Sam RazialruhFriend
Messages: 7
Registered: March 2016
Junior Member
Christian Dietrich wrote on Thu, 23 June 2016 08:48

in your case i get referencing errors already inside the base file.
it looks like it has to do with naming.


how can this referencing can be solved?

Re: port existing Eclipse Plugin to Intellij [message #1735882 is a reply to message #1735874] Thu, 23 June 2016 12:40 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13724
Registered: July 2009
Senior Member
i have no idea on this as well (no grammar). - did you take a very same grammar and model files that worked in eclipse?

for me it looks there must be something missing e.g. and impl for implicit imports or qualifiednameprovider.
or there is a cross ref in the grammar that does not allow to parse certain things.

if i have a look at decimal-format the qualified name seems to be abcompany_default.datatype-decimal.decimal-format

since the datatype-decimal is a keyword you cannot write the qualified name
so there must be a implicit or explicit import for abcompany_default.datatype-decimal*
or the nameprovider must give it a different name.

from your code i seem many customization classes on scoping and stuff like that as that as well.
so do you have any unit tests that makes the base file beeing green?


and i am not faminilar with the details of the xtext idea impl.
but i have the feeling the idea support is still very clunky. at least when using this maven multi module stuff in idea


Need professional support for Xtext, Xpand, EMF?
Go to: https://www.itemis.com/en/it-services/methods-and-tools/xtext
Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Rules priority xtext
Next Topic:Xtext keyword problem
Goto Forum:
  


Current Time: Wed Jan 27 16:05:02 GMT 2021

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

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

Back to the top