SLinkOperations import

Am not able to import the above language. how do i do it?
This is not a language but just Java class which can be used by importing the smodelAdapter java_stub. But I really doubt that you want to do this because all the methods are also provided by the smodel language.
@fabma : All i need to do is to generate a node of the same MPS language from a node's template fragment. But am getting Derprecated symbol on SLinkOperations. How should i do it? Any samples or Links would be of great help
Sorry, I don't understand your issue. You must explain it in more detail.
I am still dealing with the above problem. From samples, its seems that it is easy to get a node's value in auto completion menu through reference(as in calculator example). But is there any way to generate a DSL's node from the same DSL's script? Like, say when i add a movie i give all its attributes(name,actors,year, etc.). I should be able to generate respective nodes(commands - 'actor <actor name>' for example) in a seperate script, when i add them in the database through add command. So that i could use the generated list as a reference in auto-completion.

I still have not grasped your problem...
What do you mean with DSL script?
I have no experiences with persistence loading models but if you want to add advanced auto completion entries node substitute actions should help you. But I can't see the relation to your initial question!?
My problem is bascically to get a list of options in an auto completion menu. The options list is dynamic .That is, if i add a new entry to the database, this list should be updated automatically.

Sample Code:
Say i insert a new Question to a question Bank. The code in newLanguage will be like this
       create question
        Question : qq111
        type : t111
        Answer : a111
        Subject : s111
        Difficulty : 111
These Questions are inserted in a Question Bank which is an XML file. I can retrieve all the subjects from the XML file.

Now, when i have to access the available list, say
       VIEW QUESTIONS ON : <no subject>
I must be able to get the list of subjects in the auto-completion at the '|<no subject>' part.

For now, i have a predefined list of Subjects which i have it in a node in my solution as
       Subject subjectA
       Subject subjectB
       Subject subjectC
I am able to get this list in my auto completion using references.

I need to know if there is any way for me to generate the node(the one that contains the list of subjects). So that I can insert a node wenever i insert a question. This in a way, can solve my problem.

When i tried creating a node from generator, I got errors in SLinkOperations. When i tried to import smodelAdapter java_stub, I couldnt. And moreover it says node creation in generator is Invalid. Maybe i took a wrong path.

Any suggestions on how to approach this issue would be a great help.  

Sorry for making it lengthy.

Is your data stored in a real data base or is it just an xml file of adequate size? Just for the latter you can create a persistence model loader and parse all data into a normal MPS AST. If you want to use a data base with a query tool, then you have to hack your auto complete menu. In this case you can't deal with MPS references/links since you have no nodes to reference. You have to store your information in plain string attributes.
We are using xml file for storage. What is a persistence model loader? Please Do share links of samples, if any..

Thanks :)

Please sign in to leave a comment.