Adding an item to the View menu item

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Adding an item to the View menu item

Wesley Saunders
Hello,

I have another (hopefully quick question).

Currently I have my view components placed in "org.protege.ontologycategory"

I am wondering if there is a way I can create my own custom name to store them all under, with out having to create an entirely new menu item. Since they are all view components I am hoping to still store them under that option but organized in my own drop down.

Thank you,

Wes


_______________________________________________
p4-feedback mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/p4-feedback
Reply | Threaded
Open this post in threaded view
|

Re: Adding an item to the View menu item

Timothy Redmond

I actually believe  that this works - in fact I think that co-ode does this.  But I can't remember how it is done exactly.  I will try to take a look later (working on rendering issues today).

-Timothy


On 04/23/2010 02:46 PM, Wesley Saunders wrote:
Hello,

I have another (hopefully quick question).

Currently I have my view components placed in "org.protege.ontologycategory"

I am wondering if there is a way I can create my own custom name to store them all under, with out having to create an entirely new menu item. Since they are all view components I am hoping to still store them under that option but organized in my own drop down.

Thank you,

Wes

_______________________________________________ p4-feedback mailing list [hidden email] https://mailman.stanford.edu/mailman/listinfo/p4-feedback


_______________________________________________
p4-feedback mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/p4-feedback
Reply | Threaded
Open this post in threaded view
|

Re: Adding an item to the View menu item

Timothy Redmond
In reply to this post by Wesley Saunders
On 04/23/2010 02:46 PM, Wesley Saunders wrote:
Hello,

I have another (hopefully quick question).

Currently I have my view components placed in "org.protege.ontologycategory"

I haven't tested it but I believe I see how to do this.  Let's take the example  you gave and ask how it manages to show up in the menu as "Ontology views".  There is a piece of code in ProtegeApplication.loadDefaults() that contains the following line:
ProtegeProperties.getInstance().put(ProtegeProperties.ONTOLOGY_VIEW_CATEGORY, "Ontology");
  
Here we have
ONTOLOGY_VIEW_CATEGORY = PROTEGE_PREFIX + "ontologycategory"
PROTEGE_PREFIX = "org.protege."
  
I think that you need to use the PROTEGE_PREFIX  actually but you could probably make your own suffix.  You could then run
ProtegeProperties.getInstance().put(ProtegeProperties.PROTEGE_PREFIX + "myViewCategory", "My Category ");
and use @org.protege.myViewCategory in the plugin.xml declaration of your view.

-Timothy



I am wondering if there is a way I can create my own custom name to store them all under, with out having to create an entirely new menu item. Since they are all view components I am hoping to still store them under that option but organized in my own drop down.

Thank you,

Wes

_______________________________________________ p4-feedback mailing list [hidden email] https://mailman.stanford.edu/mailman/listinfo/p4-feedback


_______________________________________________
p4-feedback mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/p4-feedback
Reply | Threaded
Open this post in threaded view
|

Re: Adding an item to the View menu item

Timothy Redmond

Hmm... I see that I didn't completely finish my  thought.  A key thing about  this is that you want to make your calls before the view menu is clicked.  You could probably do this by putting your code in an activator.

-Timothy



On 04/23/2010 04:50 PM, Timothy Redmond wrote:
On 04/23/2010 02:46 PM, Wesley Saunders wrote:
Hello,

I have another (hopefully quick question).

Currently I have my view components placed in "org.protege.ontologycategory"

I haven't tested it but I believe I see how to do this.  Let's take the example  you gave and ask how it manages to show up in the menu as "Ontology views".  There is a piece of code in ProtegeApplication.loadDefaults() that contains the following line:
ProtegeProperties.getInstance().put(ProtegeProperties.ONTOLOGY_VIEW_CATEGORY, "Ontology");
  
Here we have
ONTOLOGY_VIEW_CATEGORY = PROTEGE_PREFIX + "ontologycategory"
PROTEGE_PREFIX = "org.protege."
  
I think that you need to use the PROTEGE_PREFIX  actually but you could probably make your own suffix.  You could then run
ProtegeProperties.getInstance().put(ProtegeProperties.PROTEGE_PREFIX + "myViewCategory", "My Category ");
and use @org.protege.myViewCategory in the plugin.xml declaration of your view.

-Timothy



I am wondering if there is a way I can create my own custom name to store them all under, with out having to create an entirely new menu item. Since they are all view components I am hoping to still store them under that option but organized in my own drop down.

Thank you,

Wes

_______________________________________________ p4-feedback mailing list [hidden email] https://mailman.stanford.edu/mailman/listinfo/p4-feedback

_______________________________________________ p4-feedback mailing list [hidden email] https://mailman.stanford.edu/mailman/listinfo/p4-feedback


_______________________________________________
p4-feedback mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/p4-feedback
Reply | Threaded
Open this post in threaded view
|

Re: Adding an item to the View menu item

Matthew Horridge
Hi,

If I recall correctly, you can just name a view category with any string and it should work - the category will be named with the string (if it isn't one of the build in categories).

Cheers,

Matthew



On 23 Apr 2010, at 17:17, Timothy Redmond wrote:

>
> Hmm... I see that I didn't completely finish my  thought.  A key thing about  this is that you want to make your calls before the view menu is clicked.  You could probably do this by putting your code in an activator.
>
> -Timothy
>
>
>
> On 04/23/2010 04:50 PM, Timothy Redmond wrote:
>> On 04/23/2010 02:46 PM, Wesley Saunders wrote:
>>> Hello,
>>>
>>> I have another (hopefully quick question).
>>>
>>> Currently I have my view components placed in "org.protege.ontologycategory"
>>
>> I haven't tested it but I believe I see how to do this.  Let's take the example  you gave and ask how it manages to show up in the menu as "Ontology views".  There is a piece of code in ProtegeApplication.loadDefaults() that contains the following line:
>> ProtegeProperties.getInstance().put(ProtegeProperties.ONTOLOGY_VIEW_CATEGORY, "Ontology");
>>  
>>
>> Here we have
>> ONTOLOGY_VIEW_CATEGORY = PROTEGE_PREFIX + "ontologycategory"
>> PROTEGE_PREFIX = "org.protege."
>>  
>>
>> I think that you need to use the PROTEGE_PREFIX  actually but you could probably make your own suffix.  You could then run
>> ProtegeProperties.getInstance().put(ProtegeProperties.PROTEGE_PREFIX + "myViewCategory", "My Category ");
>> and use @org.protege.myViewCategory in the plugin.xml declaration of your view.
>>
>> -Timothy
>>
>>
>>>
>>> I am wondering if there is a way I can create my own custom name to store them all under, with out having to create an entirely new menu item. Since they are all view components I am hoping to still store them under that option but organized in my own drop down.
>>>
>>> Thank you,
>>>
>>> Wes
>>>
>>>
>>> _______________________________________________
>>> p4-feedback mailing list
>>>
>>> [hidden email]
>>> https://mailman.stanford.edu/mailman/listinfo/p4-feedback
>>>
>>>  
>>>
>>
>>
>> _______________________________________________
>> p4-feedback mailing list
>>
>> [hidden email]
>> https://mailman.stanford.edu/mailman/listinfo/p4-feedback
>>
>>  
>>
>
> _______________________________________________
> p4-feedback mailing list
> [hidden email]
> https://mailman.stanford.edu/mailman/listinfo/p4-feedback

_______________________________________________
p4-feedback mailing list
[hidden email]
https://mailman.stanford.edu/mailman/listinfo/p4-feedback