Thanks for the Preference menu item support on MacOS X!

Thanks to JetBrains people! It's convenient and make me, a MacOS X user, feel right at home! :)

0
9 comments

Hrm, what build? On 1089 all of the items on the apple menu are greyed out for me...

0

Hani,
I meant build 1089. Even better, I found later that the about menu item works as it should be like a native MacOS X application. :) IDEA Aurora does make me feel developing with pleasure.
One more thing, in the bundle plist file the Java version has been fixed to be '1.4+' on build 1089 as well.

0

I'm running 1089 and the only Preferences I see ar on the Apple Menu Bar, and it is greyed out.

0

Oops! I forgot to mention that my JDK version is Apple JDK 1.4.2 DP2. :)

0

On 1/11/04 7:50 PM, in article
32189659.1073839805147.JavaMail.itn@is.intellij.net, "Richard Chuo"
<forthy@mac.com> wrote:

Oops! I forgot to mention that my JDK version is Apple JDK 1.4.2 DP2. :)


Hmm, it haven't been said in apple javadoc that com.apple.eawt.Application
works under 1.4.2 only. We're using the following code to enable system menu
actions. Does anyone has any ideas why this can fail to operate?

public class MacOSApplicationProvider implements ApplicationComponent {
public String getComponentName() {
return "MACOSApplicationProvider";
}

public void initComponent() {
if (SystemInfo.isMac) {
try {
Worker.initMacApplication();
}
catch (NoClassDefFoundError e) {
}
}
}

public void disposeComponent() {
}

private static class Worker {
public static void initMacApplication() {
Application application = new Application();
application.addApplicationListener(new ApplicationAdapter() {
public void handleAbout(ApplicationEvent applicationEvent) {
AboutAction.showAbout();
applicationEvent.setHandled(true);
}

public void handlePreferences(ApplicationEvent applicationEvent) {
ConfigurableGroup[] group = new ConfigurableGroup[]{
new IdeConfigurablesGroup(),
};

ShowSettingsUtil.showSettingsDialog(getProject(), group);
applicationEvent.setHandled(true);
}

public void handleQuit(ApplicationEvent applicationEvent) {
ApplicationManagerEx.getApplicationEx().exit();
}

public void handleOpenFile(ApplicationEvent applicationEvent) {
Project project = getProject();
String filename = applicationEvent.getFilename();
if (project != null && filename != null && new
File(filename).exists()) {
OpenFileAction.openFile(filename, project);
applicationEvent.setHandled(true);
}
}
});

application.addAboutMenuItem();
application.addPreferencesMenuItem();
application.setEnabledAboutMenu(true);
application.setEnabledPreferencesMenu(true);
}

private static Project getProject() {
return
(Project)DataManager.getInstance().getDataContext().getData(DataConstants.PR
OJECT);
}
}
}


--
Maxim Shafirov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


0

Hm, very odd. I'm using 1.4.2DP2 and it doesn't show up. The code looks correct Maxim.

0

On 1/12/04 5:15 PM, in article
8966465.1073916904826.JavaMail.itn@is.intellij.net, "Hani Suleiman"
<hani@formicary.net> wrote:

Hm, very odd. I'm using 1.4.2DP2 and it doesn't show up. The code looks
correct Maxim.


More odd is Hide, Hide Others and Show All are disabled as well though
there's no way to control this through eawt.Application

--
Maxim Shafirov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


0

Hide, Hide Others, and Preferences become active if you enable the system menu bar (at least on my box).

0

in version 1094 it seems that the elements in the "IntelliJ IDE" menu
( Hide, etc ) go grey shortly after the application launches...
which makes Hiding the app impossible.

adding "-Dapple.laf.useScreenMenuBar=true" to the VM options
solves this issue - haven't used the app long enough with this set to know whether there is any associated instability.

there is still a problem with the app being un-hideable when there
is a pop-up window present.
- though this is apparently an apple issue ( still need to follow up )
see: http://www.intellij.net/forums/thread.jsp?forum=13&thread=65309

0

Please sign in to leave a comment.