Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Custom Templates(How access to my custom templates?)
Custom Templates [message #1745393] Mon, 10 October 2016 07:36
Yves LEDUC is currently offline Yves LEDUCFriend
Messages: 53
Registered: May 2015
Member
In the code of my application I want to access the templates created in Algorithmic category preferences of my application (see pictures attachedindex.php/fa/27333/0/).
For this I begin by accessing the templates category Java.Le code:

val = JavaPlugin templates. ^ default.templateStore.templates
val = JavaPlugin template. default.templateStore.findTemplate ^ ( "elseif")

over these lines to check the content of templates and template:

// Display the names of all templates
for (t: 0 .. <templates.length)
System.out.println ( "Template name:" + templates.get (t) .name)
// Display the name of the desired template and code model
System.out.println ( "\ nTemplate \ nname" template.name + + "\ npattern:" + template.pattern)

which gives the following output:

So it works the way I want. It remains for me to do the same for my Algorithmic templates.
index.php/fa/27334/0/
To do the same for Algorihtmic in Java instead of the previous paragraph I create the code:

templates = AlgpActivator. ^ default.templateStore.templates
template = AlgpActivator. ^default.templateStore.findTemplate ( "MyTemplate")

But templateStore does not exist for AlgpActivator and accordingly the error below is displayed:

The method or field templateStore is undefined for the kind AlgpActivator.

How to overcome this defect. How to access the templates Algorihtmic category of my application.
Previous Topic:Is there a way to force Accessibility to re-read the active page?
Next Topic:GTK 3.22 Breaking Eclipse UI?
Goto Forum:
  


Current Time: Wed Nov 22 05:53:37 GMT 2017

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

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