Originally Posted by
T.J.
This is a "diff" patch, so you need to use the "patch" utility.
You should always backup the source before you attempt to apply a patch file. There are no guarantees that it will apply properly the first time. You may have to adjust the patch level ("-p" parameter in order to get the files in the right folders), depending on where you are in the source tree when you attempt to apply the patch.
Assuming you have the source code for NetBeans to apply the patch to, try:
patch -p0 < patch filename
when in the top of the source directory.
If you get stuck, let me know, and I'll try to help you get the patch applied properly.
T.J.
Thanks. But heres the problem.
the .diff file contains
Code:
diff --git a/core.windows/src/org/netbeans/core/windows/view/ui/MainWindow.java b/core.windows/src/org/netbeans/core/windows/view/ui/MainWindow.java --- a/core.windows/src/org/netbeans/core/windows/view/ui/MainWindow.java +++ b/core.windows/src/org/netbeans/core/windows/view/ui/MainWindow.java @@ -58,6 +58,7 @@ import java.awt.Rectangle; import java.awt.event.*; import java.io.File; +import java.lang.reflect.Field; import java.util.*; import java.util.logging.Level; import java.util.logging.Logger; @@ -139,6 +140,23 @@ if (mainMenuBar == null) { mainMenuBar = createMenuBar(); ToolbarPool.getDefault().waitFinished(); + if ("gnome-shell".equals(System.getenv("DESKTOP_SESSION"))) { + try { + Class<?> xwm = Class.forName("sun.awt.X11.XWM"); + Field awt_wmgr = xwm.getDeclaredField("awt_wmgr"); + awt_wmgr.setAccessible(true); + Field other_wm = xwm.getDeclaredField("OTHER_WM"); + other_wm.setAccessible(true); + if (awt_wmgr.get(null).equals(other_wm.get(null))) { + Field metacity_wm = xwm.getDeclaredField("METACITY_WM"); + metacity_wm.setAccessible(true); + awt_wmgr.set(null, metacity_wm.get(null)); + LOGGER.info("installed #198639 workaround"); + } + } catch (Exception x) { + LOGGER.log(Level.FINE, null, x); + } + } } }
From the file i figured that i should patch
/core.windows/src/org/netbeans/core/windows/view/ui/MainWindow.java But no file exists like that. The closest directory i found was
/home/athul/.netbeans/7.2/config/Preferences/org/netbeans/core/windows
Bookmarks