Note that there are some explanatory texts on larger screens.

plurals
  1. POEclipse RCP: Where should I keep my model objects and how do they talk to the views?
    primarykey
    data
    text
    <p>In Eclipse RCP way of doing things, where should I keep my model objects? And when they are loaded or changed, how should they talk to the views?</p> <p>I am attempting to port my existing application to Eclipse RCP. It could be viewed as an IDE-like application: I open a file, which contains links to source files. The source files are displayed in the tree view. I can edit the source, and build the sources into some output...</p> <p>For example, when I handle the Open command, where would I create the model object so my views can see them? I'd rather avoid the use of singleton manager class, but that maybe the simplest way.</p> <p>Interesting code I found browsing JDT's source code are JavaCore, JavaModel, JavaModelManager. and JavaProject.</p> <hr> <pre><code>IProject[] projects= ResourcesPlugin.getWorkspace().getRoot().getProjects(); </code></pre> <hr> <pre><code>public static IJavaProject create(IProject project) { if (project == null) { return null; } JavaModel javaModel = JavaModelManager.getJavaModelManager().getJavaModel(); return javaModel.getJavaProject(project); } </code></pre> <hr> <p>Related:</p> <ul> <li><a href="https://stackoverflow.com/questions/282509/how-do-you-communicate-between-eclipse-declarative-services-and-views-contentpr">How do you communicate between eclipse declarative services and Views (ContentProviders)</a></li> <li><a href="http://www-128.ibm.com/developerworks/java/library/os-ecllink/index.html" rel="nofollow noreferrer">Make your Eclipse applications richer with view linking</a></li> </ul>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload