Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoramitin2015-05-18 16:24:30 +0000
committeramitin2015-05-18 16:24:30 +0000
commitb152a938470f608c77636d74a27dccb7e49578f7 (patch)
tree11b4d0849bff627027cf7a5569c3b5991a979e21
parentfa38bff9c194c06ec3bd2e25f9d0e0f8c82227e5 (diff)
downloadorg.eclipse.windowbuilder-b152a938470f608c77636d74a27dccb7e49578f7.tar.gz
org.eclipse.windowbuilder-b152a938470f608c77636d74a27dccb7e49578f7.tar.xz
org.eclipse.windowbuilder-b152a938470f608c77636d74a27dccb7e49578f7.zip
Remove obsolete code
-rwxr-xr-xorg.eclipse.wb.os.linux/os/linux/x86/libwbp-compiz.sobin5460 -> 0 bytes
-rwxr-xr-xorg.eclipse.wb.os.linux/os/linux/x86_64/libwbp-compiz.sobin10216 -> 0 bytes
-rw-r--r--org.eclipse.wb.os.linux/src/org/eclipse/wb/internal/os/linux/Activator.java105
-rw-r--r--org.eclipse.wb.os.linux/src/org/eclipse/wb/internal/os/linux/Messages.java2
-rw-r--r--org.eclipse.wb.os.linux/src/org/eclipse/wb/internal/os/linux/Messages.properties2
5 files changed, 1 insertions, 108 deletions
diff --git a/org.eclipse.wb.os.linux/os/linux/x86/libwbp-compiz.so b/org.eclipse.wb.os.linux/os/linux/x86/libwbp-compiz.so
deleted file mode 100755
index 0e42e956..00000000
--- a/org.eclipse.wb.os.linux/os/linux/x86/libwbp-compiz.so
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.wb.os.linux/os/linux/x86_64/libwbp-compiz.so b/org.eclipse.wb.os.linux/os/linux/x86_64/libwbp-compiz.so
deleted file mode 100755
index 3b28a9ae..00000000
--- a/org.eclipse.wb.os.linux/os/linux/x86_64/libwbp-compiz.so
+++ /dev/null
Binary files differ
diff --git a/org.eclipse.wb.os.linux/src/org/eclipse/wb/internal/os/linux/Activator.java b/org.eclipse.wb.os.linux/src/org/eclipse/wb/internal/os/linux/Activator.java
index 6f182ee0..db81e0a0 100644
--- a/org.eclipse.wb.os.linux/src/org/eclipse/wb/internal/os/linux/Activator.java
+++ b/org.eclipse.wb.os.linux/src/org/eclipse/wb/internal/os/linux/Activator.java
@@ -12,46 +12,27 @@ package org.eclipse.wb.internal.os.linux;
import com.google.common.collect.Maps;
-import org.eclipse.wb.core.branding.BrandingUtils;
-import org.eclipse.wb.internal.core.DesignerPlugin;
-import org.eclipse.wb.internal.core.utils.IOUtils2;
import org.eclipse.wb.internal.core.utils.reflect.ReflectionUtils;
import org.eclipse.core.runtime.Plugin;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialogWithToggle;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.apache.commons.io.IOUtils;
-import org.apache.commons.lang.StringUtils;
import org.osgi.framework.BundleContext;
-import java.io.File;
-import java.io.FileFilter;
import java.io.InputStream;
import java.net.URL;
import java.util.Map;
/**
* The activator class controls the plug-in life cycle.
- *
+ *
* @author mitin_aa
* @coverage os.linux
*/
public class Activator extends AbstractUIPlugin {
- private static boolean gconfAvailable = false;
- static {
- try {
- System.loadLibrary("wbp-compiz");
- gconfAvailable = true;
- } catch (Throwable e) {
- // can't load gconf-related lib, skipping all compiz checks.
- }
- }
- private static final String PK_ASK_FOR_WORKAROUND =
- "org.eclipse.wb.os.linux.compizDontAskForWorkaround";
public static final String PLUGIN_ID = "org.eclipse.wb.os.linux";
//
private static Activator m_plugin;
@@ -65,7 +46,6 @@ public class Activator extends AbstractUIPlugin {
public void start(BundleContext context) throws Exception {
super.start(context);
m_plugin = this;
- scheduleCompizCheck();
}
@Override
@@ -135,87 +115,4 @@ public class Activator extends AbstractUIPlugin {
}
return image;
}
-
- ////////////////////////////////////////////////////////////////////////////
- //
- // Start-up
- //
- ////////////////////////////////////////////////////////////////////////////
- private boolean isRunningCompiz() {
- try {
- File procs = new File("/proc");
- File[] procFiles = procs.listFiles(new FileFilter() {
- public boolean accept(File pathname) {
- return pathname.isDirectory();
- }
- });
- for (File procDir : procFiles) {
- File cmdLineFile = new File(procDir, "cmdline");
- if (cmdLineFile.exists()) {
- String cmdLine = IOUtils2.readString(cmdLineFile);
- if (cmdLine.indexOf("compiz") != -1) {
- return true;
- }
- }
- }
- } catch (Throwable e) {
- // ignore silently
- }
- return false;
- }
-
- private static Display getStandardDisplay() {
- Display display = Display.getCurrent();
- if (display == null) {
- display = Display.getDefault();
- }
- return display;
- }
-
- private boolean askAgain() {
- String value = getPreferenceStore().getString(PK_ASK_FOR_WORKAROUND);
- return StringUtils.isEmpty(value);
- }
-
- private boolean isCompizSet() {
- return _isCompizSet();
- }
-
- private void setupCompiz() {
- _setupCompiz();
- }
-
- private void scheduleCompizCheck() {
- if (!gconfAvailable) {
- // no necessary gconf libs installed, skip checks.
- return;
- }
- getStandardDisplay().asyncExec(new Runnable() {
- public void run() {
- try {
- if (isRunningCompiz() && !isCompizSet() && askAgain()) {
- MessageDialogWithToggle dialog =
- MessageDialogWithToggle.openYesNoQuestion(
- null,
- BrandingUtils.getBranding().getProductName(),
- Messages.Activator_compizMessage,
- Messages.Activator_compizDontAsk,
- false,
- getPreferenceStore(),
- PK_ASK_FOR_WORKAROUND);
- int returnCode = dialog.getReturnCode();
- if (returnCode == IDialogConstants.YES_ID) {
- setupCompiz();
- }
- }
- } catch (Throwable e) {
- DesignerPlugin.log(e);
- }
- }
- });
- }
-
- private static native boolean _setupCompiz();
-
- private static native boolean _isCompizSet();
} \ No newline at end of file
diff --git a/org.eclipse.wb.os.linux/src/org/eclipse/wb/internal/os/linux/Messages.java b/org.eclipse.wb.os.linux/src/org/eclipse/wb/internal/os/linux/Messages.java
index 0db991ef..7a4c2297 100644
--- a/org.eclipse.wb.os.linux/src/org/eclipse/wb/internal/os/linux/Messages.java
+++ b/org.eclipse.wb.os.linux/src/org/eclipse/wb/internal/os/linux/Messages.java
@@ -4,8 +4,6 @@ import org.eclipse.osgi.util.NLS;
public class Messages extends NLS {
private static final String BUNDLE_NAME = "org.eclipse.wb.internal.os.linux.Messages"; //$NON-NLS-1$
- public static String Activator_compizDontAsk;
- public static String Activator_compizMessage;
static {
// initialize resource bundle
NLS.initializeMessages(BUNDLE_NAME, Messages.class);
diff --git a/org.eclipse.wb.os.linux/src/org/eclipse/wb/internal/os/linux/Messages.properties b/org.eclipse.wb.os.linux/src/org/eclipse/wb/internal/os/linux/Messages.properties
index e5b4ba7a..e69de29b 100644
--- a/org.eclipse.wb.os.linux/src/org/eclipse/wb/internal/os/linux/Messages.properties
+++ b/org.eclipse.wb.os.linux/src/org/eclipse/wb/internal/os/linux/Messages.properties
@@ -1,2 +0,0 @@
-Activator_compizDontAsk=Do not ask again
-Activator_compizMessage=It seems that you're running the Compiz Window Manager. It allows the special windows to appear offscreen and this will allow the product to prevent preview window flickering.\n\nDo you want to setup the Compiz WM to move the preview windows into the offscreen area?

Back to the top