Eclipse plugin Based menu development - java

I have enabled a new menu through plugin.xml using menuContribution, now I want to change the color and size of the text in this menu, how can I do this?

I don't think there is an API to change color/font on org.eclipse.swt.widgets.MenuItem

Related

Eclipse keep file highlighted

I just migrated from Eclipse 2019-06 to Eclipse 2021-03, and there's a difference that's driving me crazy, and I don't know how to have the same behavior as before.
When I lose focus in the Project Explorer view, I'm unable to view the highlighted file as before.
NOTE: What I'm looking for is not the way to show the current file (present in the editor) linked against the Project Explorer. It's just the way to keep the file that I selected in Project Explorer highlighted when it looses focus.
The theme you are using is responsible for this behavior:
In the Light theme + Default color scheme, when the focus in on the Package Explorer:
When it is on the editor:
As setting the theme to Dark litterally froze my Eclipse, I can only give you those insight on what to do:
Check in the General > Color. You could for example change the background color to some visible one (yellow, green, ...) until you see a change in the unfocused Package Explorer. Once done, you can restore default colors and only set it on the part that needs change.
If you use some plugin that provide more themes, check with those themes.
Use Light theme !

why jpackage icon not used in windows search toolbar?

I am creating the installer using the following command. I am giving jpackage the icon to use
jpackage --runtime-image hellofx --module hellofx/hellofx.HelloFX --win-shortcut --win-menu --icon smile.ico
When i install the program the icon is used for desktop shortcut but in the search toolbar it still displays the default java icon. Is there a way to use the given icon in search toolbar as well? I appreciate any help. thanks!
UPDATE:
here it seems the icons are correctly applied to app icons in search toolbar.
https://walczak.it/blog/distributing-javafx-desktop-applications-without-requiring-jvm-using-jlink-and-jpackage
UPDATE 2:
Start menu icon is correct
So i finally solved it. It was a caching issue like Campbell pointed out. For some reason the icon is cached. Here is an example.
I changed the icon to a camera icon. The new icons display in the desktop shortcut and in the start menu as shown below.
Before this icon i used a music icon. So in the search the old icon is still in place. So this icon is cached for some reason. Only if i change the app as well as icon then all icons are changed to the new icon. Maybe this is an issue with windows 10. So the issue is now solved.

Eclipse right click new project preferences

Well, honestly, it is a simple question I can't find on eclipse nor google.
I am a lazy dev and want to add the Maven Projectoption to my [right click]->New->(Maven Project). But can't find an option in the preferences. Every Javaproject I create is a maven project (DM FTW, YEA!)
In PHPStorm I can simply add/edit an entry in a config section and I am done. It gets added to any "New" context.
Can I do something like that in eclipse? Add completely new "New..." entries to create a templated new file type and (the original topic) can I add another menu entry without writing a plugin?
Thank you in advance!
open eclipse, then go to Window menu, select Customize perspective...
a windows appears. it has for tabs.
Tool bar visiblity
Menu visiblity
Command Groups Availablity
Shortcuts
select Menu visiblity tab, it will shows all menus with tree view.
then expand tree view of File then do same for the New which is sub tree of File.
now select All of those project types that you want, then click Ok.
The concept is:
new means creating a bare project begining from zero,
adding means import some project that you/other have/has started...
in eclipse import is the menu you need to click to, then maven, then select the proj option the best fits you...

Remove Project explorer from rdditor [duplicate]

How can I disable the Java editor breadcrumb in Eclipse?
If you are referring to the breadcrumbs in the help file of a RCP application, there is only a manual way to do it.
Since Ganymede 3.4M5:
Michael Borgwardt mentions the toolbar icon
Slava Semushin provides a native shortcut based on Ctrl+3+bread, which points directly to the Toggle Java Editor Breadcrumb option.
Shachi reminds us below that you can right-click on any icon on the breadcrumb, and select the entry named "Hide Breadcrumb".
Original answer (manual way, through key mapping)
Find the file org.eclipse.help.webapp\advanced\breadcrumbs.css and replace its contents with.
.help_breadcrumbs {
display: none;
}
For the Java Editor breadcrumb, you need to assign a shortcut to the "Toggle Java Editor Breadcrumb" command (I have tested Alt+B, for instance)
That shortcut will make the breadcrumb bar appear/disappear at will.
With the editor window focussed, look for this icon in your toolbar:
And click on it. That's all. The icon is present by default, but can be deactivated, in which case you have to activated as in MvanGeest's answer.
Another way which works for me at Eclipse Indigo (3.7): press Ctrl+3 and type bread, after that click on item Toggle Java Editor Breadcrumb.
RightClick on any icon on breadcrumb.
There is an option named HIDE BREADCRUMB.
Click it and you are done. :D
Look for this icon in the toolbar:
This button toggles the Breadcrumb view on/off.
(I'm using Eclipse 3.7, and it's there by default)
Here it is :
In the toolbar, toggle bread crumb option.
Something like http://loadcontext.blogspot.com/2008/08/eclipse-34-breadcrumbs-hide-and-show.html?
Customize Perspective, choose the
Commands tab. In the Available command
group, choose Java Editor
Presentation. The Toolbar details
shows the button for Toggle
Breadcrumbs, which looks like a folder
with a C in a circle with a black
triangle on top of it.
Despite my absolute lack of experience with Eclipse, I suppose this setting must appear in other Presentation items too. After the button's enabled, all you have to do is click it. Or not?
Change property breadcrumb.org.eclipse.jdt.ui.JavaPerspective from true to false
in your org.eclipse.jdt.ui.prefs file.
In Juno: type 'Bread' and select 'Toggle Java Editor Breadcrumb'
It very simple just right click in your class editor then select bread crumb or directly right click in top of your class in tool bar then select hide breadcrumb then its done.
When you see the BreadCrumb toolbar, right-click on the green class icon and then from the menu options click on Hide Breadcrumb.

Installed dark theme in eclipse, but scrollbars is still grey

I am using Eclipse Luna(4.4.0) and trying to make it completely dark. So I Installed a theme plugin:
Eclipse menu -> Help -> Eclipse Marketplace, search "Eclipse Color Theme Plugin"
In “Windows Preferences”, selected the “Dark” theme and
Eclipse menu -> Window -> Preference -> General -> Appearance -> Color Theme,
choosed “sublime Text 2″. Done, I'm just changed everything to “Dark”.
But, scrollbars is still grey
Does anybody know how to make it dark too?
Thanks in advance!!
Eclipse's built in dark theme is very problematic.
Check out the DevStyle plugin from Eclipse marketplace. It creates dark themes up to par with other IDEs like IntelliJ.
https://marketplace.eclipse.org/content/darkest-dark-theme-devstyle
For all mac users out there, you can change it in system preferences:
Apple menu > System Preferences, then click General > Show scroll bars
Select “Automatically based on mouse or trackpad.” i voila :)
cmd+space
System Preferences
General
Show scroll bars: "When scrolling" (see screenshot)
In my opinion though, this isn't a great solution because you don't see the scroll bar sometimes and sometimes it still shows the bright grey scroll bar depending on where you put your mouse.
If you want to get rid of that scrollbar, enable Show whitespace characters in
Preferences > General > Editors > Text Editors

Categories