Thinking? 

Usually you use a "WorkbenchService" to hold information like this; i.e. 
objects you use to control your application. An example is the workbench 
selection service; but you can also create your own.

Have you run through the workbench tutorial we have for uDig? It is not really 
uDig specific in that in mostly shows how the eclipse views can use workbench 
selection to communicate with each other.

We also have the map blackboard and layer blackboard to hold objects on for 
collaboration. 

-- 
Jody Garnett


On Thursday, 28 July 2011 at 12:48 AM, Alberto Debiasi wrote:

> Hello everybody.
> 
> I have some "objects" associated to a IViewPart.
> I would access to these objects in different classes and methods.
> 
> For example I can access to a view in this way:
> 
> PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().showView("example");
> 
> Let's suppose that this view has associated some objects:
> 
> String object1;
> CustomObject object2;
> 
> Can I access to these objects in a similar manner?
> 
> For example like this??
> 
> PlatformUI.getWorkbench()." getObject(...)"
>  PlatformUI.getWorkbench()." setObject(....)"
> 
> The only solutions that I have in mind are:
> 1: use a STATIC class with the objects inside.
> 2: insert the objects inside the view.
> 
> Are there other possible ways?
> 
> Thanks!
> Alberto
> _______________________________________________
> User-friendly Desktop Internet GIS (uDig)
> http://udig.refractions.net
> http://lists.refractions.net/mailman/listinfo/udig-devel

_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel

Reply via email to