From: pombredanne Date: Sun, 22 Oct 2006 19:30:21 +0000 (+0000) Subject: Deleted unused commenst and unused vars. X-Git-Url: http://git.phpeclipse.com?hp=7078ce8cf90586ae256302c6e389c524d87df58a Deleted unused commenst and unused vars. --- diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/AbstractProposal.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/AbstractProposal.java index 4089800..4bbc2e6 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/AbstractProposal.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/AbstractProposal.java @@ -19,9 +19,6 @@ import org.eclipse.jface.text.contentassist.IContextInformation; import org.eclipse.swt.graphics.Point; import org.eclipse.swt.widgets.Shell; -// import net.sourceforge.phpdt.internal.ui.text.link.LinkedPositionManager; -// import net.sourceforge.phpdt.internal.ui.text.link.LinkedPositionUI; -// import net.sourceforge.phpdt.internal.ui.util.ExceptionHandler; /** * A PHP identifier proposal. @@ -85,11 +82,7 @@ public abstract class AbstractProposal implements IPHPCompletionProposal { } protected void handleException(CoreException e) { - Shell shell = fViewer.getTextWidget().getShell(); PHPeclipsePlugin.log(e); - // ExceptionHandler.handle(e, shell, - // ObfuscatorMessages.getString("TemplateEvaluator.error.title"), null); - // //$NON-NLS-1$ } protected void openErrorDialog(BadLocationException e) { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/IdentifierProposal.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/IdentifierProposal.java index 280739e..fcf43cd 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/IdentifierProposal.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/IdentifierProposal.java @@ -23,12 +23,8 @@ public class IdentifierProposal extends AbstractProposal { private final Image fImage_var; - // private TemplateBuffer fTemplateBuffer; - private String fOldText; - private final IRegion fRegion; - // private IRegion fSelectedRegion; // initialized by apply() private final String fTemplate; public IdentifierProposal(String template, TemplateContext context, @@ -37,7 +33,6 @@ public class IdentifierProposal extends AbstractProposal { fTemplate = template; fContext = context; - // fViewer = viewer; fImage_fun = image_fun; fImage_var = image_var; fRegion = region; @@ -53,8 +48,6 @@ public class IdentifierProposal extends AbstractProposal { LinkedPositionUI editor = new LinkedPositionUI(fViewer, manager); editor.setFinalCaretOffset(fTemplate.length() + start); - // editor.setFinalCaretOffset(getCaretOffset(fTemplateBuffer) + - // start); editor.enter(); fSelectedRegion = editor.getSelectedRegion(); } catch (BadLocationException e) { @@ -64,7 +57,7 @@ public class IdentifierProposal extends AbstractProposal { } public String getAdditionalProposalInfo() { - return textToHTML(fTemplate); // fTemplateBuffer.getString()); + return textToHTML(fTemplate); } public String getDisplayString() { diff --git a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/SQLProposal.java b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/SQLProposal.java index cd3ba69..317e01c 100644 --- a/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/SQLProposal.java +++ b/net.sourceforge.phpeclipse/src/net/sourceforge/phpdt/internal/ui/text/template/SQLProposal.java @@ -19,9 +19,7 @@ import org.eclipse.swt.graphics.Image; /** * A PHP identifier proposal. */ -public class SQLProposal extends AbstractProposal { // implements - // IPHPCompletionProposal - // { +public class SQLProposal extends AbstractProposal { private final TemplateContext fContext; private final Image fImage_var; @@ -72,8 +70,6 @@ public class SQLProposal extends AbstractProposal { // implements */ public void apply(IDocument document) { try { - // if (fTemplateBuffer == null) - // fTemplateBuffer= fContext.evaluate(fTemplate); int start = fRegion.getOffset(); int end = fRegion.getOffset() + fRegion.getLength(); String resultString = fTableName; @@ -81,37 +77,17 @@ public class SQLProposal extends AbstractProposal { // implements resultString = fColumnName; } // insert template string - // String templateString = fTemplate; // - // fTemplateBuffer.getString(); document.replace(start, end - start, resultString); // translate positions LinkedPositionManager manager = new LinkedPositionManager(document); - // TemplatePosition[] variables= fTemplateBuffer.getVariables(); - // for (int i= 0; i != variables.length; i++) { - // TemplatePosition variable= variables[i]; - // - // if (variable.isResolved()) - // continue; - // - // int[] offsets= variable.getOffsets(); - // int length= variable.getLength(); - // - // for (int j= 0; j != offsets.length; j++) - // manager.addPosition(offsets[j] + start, length); - // } LinkedPositionUI editor = new LinkedPositionUI(fViewer, manager); editor.setFinalCaretOffset(resultString.length() + start); - // editor.setFinalCaretOffset(getCaretOffset(fTemplateBuffer) + - // start); editor.enter(); fSelectedRegion = editor.getSelectedRegion(); } catch (BadLocationException e) { PHPeclipsePlugin.log(e); openErrorDialog(e); } - // catch (CoreException e) { - // handleException(e); - // } } /*