Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Custom Templates(How access to my custom templates?)
Custom Templates [message #1745393] Mon, 10 October 2016 03:36
Eclipse UserFriend
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:Switching preferences when switching perspective?
Next Topic:CommonNavigator does not refresh when ViewerFilter is present
Goto Forum:
  


Current Time: Mon Mar 24 10:17:23 EDT 2025

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

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

Back to the top