eclipse drag and drop on text editor - java

I have a requirement for creating drag and drop plugin (just like window builder) where I have a view with buttons in it. And if I drag a button and drop from the view I should be able to generate some code on the java text editor.
I want to create this plugin for generating the code. I don't have any knowledge in Eclipse plugin development. I have gone through http://www.eclipse.org/articles/viewArticle/ViewArticle2.html, but I am not sure where to store the code to be generated. Will it be somewhere in a text file, or somewhere else?

A site from 2001 will not help you alot. Today PDE does not need much experience, its self-describing.
Go "File"->"New"->"Others"
Choose "Plug-in Development" -> "Plug-in Project"
Enter a name, press Next,Next
Choose the Template "Plug-in with a View" or "Plug-in with an editor" (what you prefer)
Read and write.

AS per my understaning you want to develop graphical editor for some domain language. Options you have for this
Eclipse GEF
Eclipse GMF
Eclipse Graphiti
basically code will be stored in same file but you will have graphical editor.
PS: Developing graphical editors can be pretty tricky :)

Related

In Eclipse the text goes beyond page

I have a problem in Java Eclipse in that when I type a long sentence it goes beyond the border of my PC screen, so that I have to scroll to the right to be able to read a long sentence. I would like the text to stay within the screen, or within specific parameters, so that I don't have to scroll. Is there a way to do this?
I tried Googling a solution but can't find a way to get text to stay within screen limits :(
I found a button on the Toolbar.
In Eclipse ide 2019-03:
Toggle Word Wrap: Alt+Shift+Y
Depending on which version of Eclipse you use, there may be a way to enable Word Wrap.
In the question How do you enable word-wrap by default in Eclipse? Emmanuel Guiton explains that there is a setting which can be added manually to a preference file. Mickael states that Eclipse Neon uses the aforementioned shortcut.
Edit: Changed "Eclipse Oxygen ide 2019-03" to "Eclipse ide 2019-03"

Associate eclipse plug-in view with a file extension

I'm developing an eclipse plug-in and I would like to open files with a certain extension (e.g. .xml) with the View tab of my plug-in. Is this possible? I know this can be done for editors like this In plug-in.xml how to associate a file extension with a particular kind of editor in eclipse plug-in.
The difference between a View and an Editor has diminished with Eclipse 4. This means that you can dock editors outside the shared area on a view stack. Go ahead and try it by dragging an Editor by its title and dropping it on a view stack.
Furthermore, it is very well possible to edit files in views if you want to implement this yourself. For this to happen you have to implement ISaveablePart [1] on the view. When you implement this, the view will play in the change/dirty/save editor lifecycle of the workbench.
[1] http://help.eclipse.org/luna/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fapi%2Forg%2Feclipse%2Fui%2FISaveablePart.html
No, it is not possible.
The closest you can get is to add a separate 'open in view' menu item.

NetBeans GUI designer window to change between design and source not showing

Right now I am working on a GUI application In java using the GUI builder that comes with NetBeans.
However I have found some kind of strange bug/feature, as I am no longer able to see the window that allows users to change between "source" and "design" (Design is the drag and drop NetBeans gui builder while source is the code where you can add your own methods and so forth).
NOTE: the red is censored information that is not necessary.
When I right click on a component to add event code, then it takes me to the source (without a window for me to change back to design, it goes back to design when i close and reopen it). So I know that NetBeans recognizes that this is indeed a JFrame form with the NetBeans GUI designer, and the source code is indeed availible..
I could not find any answers to this question on this site or on the web, I have tried resetting the windows but it did not work, I also couldn't find the window when I clicked on the window option. I am sure there is some easy question but I am unable to find it. Please forgive me if this was an easy question.
On the menu bar, try clicking View -> Show Editor Toolbar

Intellij IDEA multiply windows project explorer

Could somebody tell me if it is possibile to open two instances of the same project in Intellj IDEA or can I for example have two windows with opened different project files with attached project explorer.
I asking for that because I have two monitors and it will be more efficient to navigate on each windows separately.
For now I must drag tab from root window and drop to another window which it is annoying and unhandy.
This is not possible. IntelliJ IDEA has a one project one window paradigm.
Some suggestions, in order of best to worst, that may help:
The navigation bar (Alt+Home or ⌥⇱ {Option Home}) can be used in place of the project tool window. You can use it either in pop-up mode or anchored mode (View > Navigation Bar). When a file is opened via the navigation bar, it opens in the window that has focus. The nav bar is ultimately a horizontal project window. Check the help documents for how to easily navigate through the nav bar. Once you get use to it, you may find you never use the project tool window again.
Have you tried floating the project window and placing it on the edge of one of the monitors so it sites between the two editor windows? While you would still need to drag file to the second editor window, it might prove easier.
You could create a second project with the all the same modules as the first project (just being sure to save the second project's .idea configuration directory in a different location). But this would require keeping two project configurations in sync, and you would need to make sure the "synchronize files on frame activation" setting is on. In the end, I think that is far more hassle then it is worth.
Hope that helps.
(FYI, I may be new to StackOverflow, but I'm a ten year passionate and evangelical IntelliJ IDEA user.)

java with eclipse - lost design page

I am learning Java using Eclipse - started a project with javax.swing and could view a design page with my page layouts shown and various palets for components etc. Now this design page seems to have vanished and I cant discover any option to recover it. I hope someone can get me back on track.
Have you tried Right-click on class (for example MySwingPanel.java) in package editor Open With->WindowBuilder Editor?
The last time you selected something in Open With - this is the editor to open that file on double click.
Have you tried changing the Perspective? Click the arrows next to the DDMS tab in the upper right hand corner of Eclipse and select the 'Java' Perspective.

Categories