Eclipse RCP: Add project to CNF-based Navigator - eclipse

I am working on an RCP application. Currently, I am stuck on trying to get the project created from my custom wizard to open the files in my CNF-based navigator. I am not really sure whether it needs to be done on the navigator-side or the wizard-side.

I came across a couple tutorials that put me on the right path. It turns out I needed a model for the project hierarchy and label/content providers.
http://cvalcarcel.wordpress.com/2009/07/11/writing-an-eclipse-plug-in-part-2-creating-a-custom-project-in-eclipse-adding-to-the-new-project-wizard/
http://cvalcarcel.wordpress.com/2009/07/26/writing-an-eclipse-plug-in-part-4-create-a-custom-project-in-eclipse-new-project-wizard-the-behavior/
http://cvalcarcel.wordpress.com/2009/10/18/writing-an-eclipse-plug-in-part-7-creating-a-custom-navigator/

Related

Project looking for own DLL in another project

I'm currently trying to move a solution with multiple projects from VS 2015 to VS 2019.It consists of one application and a couple of class libraries, target framework for each is .net 4.5.1. I have made a local copy of the solution to do this.
Most of the projects compile without a problem, but some of the one that are used as AddIns for the application don't.
When trying to build, doesn't matter if the projects by themselves or the whole solution, it fails because it's looking for itself. In my example picture, the project ZZ_WPF_Bank_AddIn is, while trying to build, is looking for the ZZ_WPF_Bank_AddIn in the bin folder of another project in the solution.
I tried just copying the dll from the original project, to see what happens, but it just points to the same dll missing in another project.
Has someone encountered this behaviour before? I tried googling it, but couldn't find anything useful.enter image description here
For anyone who might stumble upon this:
The solution to my problem was removing all references to projects inside the solution and adding them via Browse, noch via the projects tab on the left side. For some reason the bindings were not working properly after the migration.

How to link two or more projects in Eclipse?

I am trying to develop my application in different Eclipse Java projects where each will contain a certain feature. Then I want to combine them in one complete Java project.
However, I have a problem when linking the sources.
The sub-projects can correctly refer to parent-project classes but some of the source files that are accessed by the parent projects cannot be identified in the sub-projects.
I have a workspace/ParentProject/src/main/resources/file, where in the ParentProject I am accessing with "src\main\resources\" from within Java.
However, at runtime the ChildProject throws an exception that they cannot access the file : 'file:/E:/Eclipse%20workspace/ChildProject/src/main/resources/file'
So, when using a method of the ParentProject from the ChildProject, the classpath is somewhat transfered to the ChildProject. My question is how to resolve this.
I hope I made it clear what the problem is and will be really appreciative for any help.
Regards,
Petar
Btw: It is explained there How to link project in eclipse but I still have the error, that the child project cannot access resources accessed by the parent project.
Although I am not entirely sure what you need to do, it sounds to me that you are trying to create circular dependencies, which is an anti-pattern. You want to avoid creating dependencies where project a depends on project b, but project b also depends on project a. If you provide more details on your use case and what you are trying to create I will be happy to provide some guidance as to how you could structure your dependencies.
Hope this helps.
Right click the Parent project and click properties. Then click Java Build Path on the left hand side. Next click the projects tab. Make sure the Child project is selected as a required project, if it is not Add the Child project.
You should also do this for the Parent Project.

How to make a new Eclipse project template?

I am using a kind of framework where every time I make a new Java project. I have to arrange the files in the appropriate packages and reference the appropriate external JAR libraries. How do I make a new project template like in the New Project dialog under a new folder?
I've just done a bit of research on this for our own nefarious purposes, and found the answer.
You need to create an Eclipse plugin that uses the org.eclipse.ui.newWizards package. You can define your own category or use an existing one once you find the category ID. To create a new project wizard rather than a new resource wizard, you need to set the "project=true".
Also, your plugin must contain a class that implement org.eclipse.ui.INewWizard. Clicking on the class link from the plugin.xml editor will do the trick.
That class must do all the work in the performFinish override, and must return true to indicate that it actually did its thing and the wizard can close. This is where you create files, directories, set natures, and so forth.
You need to write an Eclipse plugin for that, and concentrate on New Project Wizard.
Writing Eclipse plugins is covered in Stack Overflow question How to write a plugin for Eclipse?.

Is it possible to group projects in Eclipse?

Is it possible to group projects in Eclipse? Or maybe have a project with sub-projects?
Eclipse offers working sets. You can reduce the projects shown in the Package Explorer and other places to whichever projects you defined into the working set. You can also show the union of various sets, and similar gymnastics.
You can define/edit/delete working sets from the little triangle dropdown menu on the Package Explorer and similar directory views.
You have two options, as far as I know:
use the already suggested Working Set option: you can create custom groups, use them to focus on a particular area of a project, activate them through Mylin; a really powerful tool indeed
use the basic concept of workspace which allows you to work on many projects and relate them (via the Build path "Projects" tab, and "Java EE Module Dependencies") so that when you need resources from other projects or you need to deploy them along with your main web application Eclipse will do that for you
Using Working Sets, you can add and organize them as shown in the picture :
As you can see my Java projects are in Working sets like Sem1 and TPs.
When you create an all new Project, just add the project to your working set, like this :
What about eclipse working sets? You define a working set and then add some projects to it. Later you could select a working set and only the projects you selected earlier are shown in project explorer.
Simpl grouping to reduce clutter.
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse.platform.doc.user/concepts/cworkset.htm
Since Eclipse Mars M5, you can see a hierarchical view of nested projects in the Project Explorer view. In the view menu, click "Projects Layout > Hierarchical". https://www.eclipse.org/mars/noteworthy/#_nested_hierarchical_view_of_projects
Working sets are great, but they don't work if the projects in one working set has the same name as in another, and such occurs in some TI C2000 chip examples that are in different directories.

Areas over multiple projects - Views not found in child projects

I've been following this guide from MSDN about "Creating an ASP.NET MVC Areas Application Using Multiple Projects". Since ASP.NET MVC 2.0 is just preview one would imagine there to be some bugs.
My problem is, it simply doesn't work! At least not the way it's suppose to. After setting everything up and pressing F5, one would think that, this will work, neat! BEEEP. Wrong.
It doesn't find the Views in the child project! Because in my case it tries to search within ~/Views which of course is in the parent!
When debugging i see that it Does run the Controller inside my child project, but when using return View(); on that Action, it looks inside the Parent View-folders.
I ask, Bug or Feature?
Tried this in both Vs2009, Vs2010 with both Framework 3.5 and 4.0.
I put "multi project areas" in Google and came accross this post: http://forums.asp.net/p/1494640/3540105.aspx. Note specifically Phil Haack's response.
It appears that defining your views in the parent project is "functioning as designed" because of this entry in the MSDN post: Now that all the code is in place, the final step is to customize the build process for each area project. This customization causes some child-area files, such as the views, to be copied to the main project before the application is built.
The "problem" with the post is that it was defined for the beta where this build step was easily accessable. RC+ you have to point to the Futures assembly and assign the build step slightly differently if this is the path you choose.
If you don't like the direction this pushes you, the portable areas portion of MvcContrib Phil mentions is about as good as you're gonna get to an alternative.
I went through the same pain as you. This is what I did.
Made sure I was running MVC 2 RC (uninstall beta 2, install the RC).
Recreated the project from scratch.
No need to edit the csproj files, no need to create a routes.cs, and no need to edit global.ascx.cs, just right click the main project to get the context menu. From the Add menu item you can create a new area.
The views have to be in the main
project or you can use the
information in this post
http://forums.asp.net/p/1494640/3540105.aspx, which I plan on doing so the views are in each area.
It doesn't support the Multi-Project areas, but for now that's ok with me. The link above does point you in the direction for multi-project areas.