Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMikhail Khodjaiants2003-11-20 17:09:24 +0000
committerMikhail Khodjaiants2003-11-20 17:09:24 +0000
commit3ab52b92d7373a9b35024f03a7a998d6df5c4458 (patch)
treeb2686709dc7362ff3b920277dacbf66093bbdfd6 /debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse
parent6ac0c7539afbee56b2440d236e88e6174935e808 (diff)
downloadorg.eclipse.cdt-3ab52b92d7373a9b35024f03a7a998d6df5c4458.tar.gz
org.eclipse.cdt-3ab52b92d7373a9b35024f03a7a998d6df5c4458.tar.xz
org.eclipse.cdt-3ab52b92d7373a9b35024f03a7a998d6df5c4458.zip
Removed dependencies on internal packages from other cdt plugins.
Diffstat (limited to 'debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse')
-rw-r--r--debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/PixelConverter.java63
-rw-r--r--debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/SolibSearchPathBlock.java9
2 files changed, 67 insertions, 5 deletions
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/PixelConverter.java b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/PixelConverter.java
new file mode 100644
index 00000000000..287c58018d7
--- /dev/null
+++ b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/PixelConverter.java
@@ -0,0 +1,63 @@
+package org.eclipse.cdt.debug.mi.internal.ui;
+
+
+/**********************************************************************
+Copyright (c) 2000, 2002 IBM Corp. and others.
+All rights reserved. This program and the accompanying materials
+are made available under the terms of the Common Public License v0.5
+which accompanies this distribution, and is available at
+http://www.eclipse.org/legal/cpl-v05.html
+
+Contributors:
+ IBM Corporation - Initial implementation
+**********************************************************************/
+
+import org.eclipse.jface.dialogs.Dialog;
+import org.eclipse.swt.graphics.FontMetrics;
+import org.eclipse.swt.graphics.GC;
+import org.eclipse.swt.widgets.Control;
+
+public class PixelConverter
+{
+ private FontMetrics fFontMetrics;
+
+ public PixelConverter( Control control )
+ {
+ GC gc = new GC( control );
+ gc.setFont( control.getFont() );
+ fFontMetrics = gc.getFontMetrics();
+ gc.dispose();
+ }
+
+ /**
+ * @see org.eclipse.jface.dialogs.DialogPage#convertHeightInCharsToPixels(int)
+ */
+ public int convertHeightInCharsToPixels( int chars )
+ {
+ return Dialog.convertHeightInCharsToPixels( fFontMetrics, chars );
+ }
+
+ /**
+ * @see org.eclipse.jface.dialogs.DialogPage#convertHorizontalDLUsToPixels(int)
+ */
+ public int convertHorizontalDLUsToPixels( int dlus )
+ {
+ return Dialog.convertHorizontalDLUsToPixels( fFontMetrics, dlus );
+ }
+
+ /**
+ * @see org.eclipse.jface.dialogs.DialogPage#convertVerticalDLUsToPixels(int)
+ */
+ public int convertVerticalDLUsToPixels( int dlus )
+ {
+ return Dialog.convertVerticalDLUsToPixels( fFontMetrics, dlus );
+ }
+
+ /**
+ * @see org.eclipse.jface.dialogs.DialogPage#convertWidthInCharsToPixels(int)
+ */
+ public int convertWidthInCharsToPixels( int chars )
+ {
+ return Dialog.convertWidthInCharsToPixels( fFontMetrics, chars );
+ }
+}
diff --git a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/SolibSearchPathBlock.java b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/SolibSearchPathBlock.java
index a97481dfab0..6d698fe4ecb 100644
--- a/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/SolibSearchPathBlock.java
+++ b/debug/org.eclipse.cdt.debug.mi.ui/src/org/eclipse/cdt/debug/mi/internal/ui/SolibSearchPathBlock.java
@@ -9,12 +9,11 @@ package org.eclipse.cdt.debug.mi.internal.ui;
import java.util.Collections;
import java.util.Observable;
-import org.eclipse.cdt.debug.internal.ui.PixelConverter;
-import org.eclipse.cdt.debug.internal.ui.dialogfields.DialogField;
-import org.eclipse.cdt.debug.internal.ui.dialogfields.IListAdapter;
-import org.eclipse.cdt.debug.internal.ui.dialogfields.LayoutUtil;
-import org.eclipse.cdt.debug.internal.ui.dialogfields.ListDialogField;
import org.eclipse.cdt.debug.mi.core.IMILaunchConfigurationConstants;
+import org.eclipse.cdt.debug.mi.internal.ui.dialogfields.DialogField;
+import org.eclipse.cdt.debug.mi.internal.ui.dialogfields.IListAdapter;
+import org.eclipse.cdt.debug.mi.internal.ui.dialogfields.LayoutUtil;
+import org.eclipse.cdt.debug.mi.internal.ui.dialogfields.ListDialogField;
import org.eclipse.cdt.utils.ui.controls.ControlFactory;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.debug.core.ILaunchConfiguration;

Back to the top