diff options
author | Noel Grandin <noel@peralex.com> | 2014-08-13 10:08:31 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-08-13 10:24:10 +0200 |
commit | 34bcf9b498bccb5c924f4cec850ff15d88df6f07 (patch) | |
tree | 4d9604ec8c3b73639338ec45a0618b5daa5cf0ed /scripting/workben | |
parent | 347926e8e57c1825261daa46c1886aa2ebf9571b (diff) |
java: remove dead methods
found by UCDetector
Change-Id: I219caa8e680dba5a395541a778df6144841c4dde
Diffstat (limited to 'scripting/workben')
-rw-r--r-- | scripting/workben/ifc/scripting/ScriptingUtils.java | 6 | ||||
-rw-r--r-- | scripting/workben/ifc/scripting/SecurityDialogUtil.java | 9 | ||||
-rw-r--r-- | scripting/workben/installer/FileUpdater.java | 64 | ||||
-rw-r--r-- | scripting/workben/installer/IdeUpdater.java | 46 | ||||
-rw-r--r-- | scripting/workben/installer/IdeVersion.java | 4 | ||||
-rw-r--r-- | scripting/workben/installer/InstUtil.java | 10 | ||||
-rw-r--r-- | scripting/workben/installer/InstallWizard.java | 40 | ||||
-rw-r--r-- | scripting/workben/installer/NavPanel.java | 10 | ||||
-rw-r--r-- | scripting/workben/installer/Version.java | 4 | ||||
-rw-r--r-- | scripting/workben/installer/XmlUpdater.java | 33 |
10 files changed, 16 insertions, 210 deletions
diff --git a/scripting/workben/ifc/scripting/ScriptingUtils.java b/scripting/workben/ifc/scripting/ScriptingUtils.java index 84cce3fc48c4..ce6071c78dd2 100644 --- a/scripting/workben/ifc/scripting/ScriptingUtils.java +++ b/scripting/workben/ifc/scripting/ScriptingUtils.java @@ -44,11 +44,9 @@ public class ScriptingUtils { return utils; } - public static void cleanUserDir() { - } - public static void cleanShareDir() { - } + + public Object getScriptStorage(XMultiServiceFactory xMSF, String location) { int id = getStorageId(xMSF, location); diff --git a/scripting/workben/ifc/scripting/SecurityDialogUtil.java b/scripting/workben/ifc/scripting/SecurityDialogUtil.java index 955e37b21036..fbcee55b5431 100644 --- a/scripting/workben/ifc/scripting/SecurityDialogUtil.java +++ b/scripting/workben/ifc/scripting/SecurityDialogUtil.java @@ -59,14 +59,7 @@ public String getErrorMessage() return errorMsg; } -/** - * Is there an error message available? - * @return true, if an error happened - */ -public boolean hasErrorMessage() -{ - return !errorMsg.equals(""); -} + /** * Press the named button in the currently visible dialog box. diff --git a/scripting/workben/installer/FileUpdater.java b/scripting/workben/installer/FileUpdater.java index 558c0c4c21d2..5c628dbd89c4 100644 --- a/scripting/workben/installer/FileUpdater.java +++ b/scripting/workben/installer/FileUpdater.java @@ -23,71 +23,7 @@ import javax.swing.JLabel; public class FileUpdater { - public static boolean updateProtocolHandler( String installPath, JLabel statusLabel ) { - File in_file = null; - File out_file = null; - FileWriter out = null; - int count = 0; - - try { - in_file = new File( installPath+File.separator+"share"+File.separator+"registry"+File.separator+"data"+File.separator+"org"+File.separator+"openoffice"+File.separator+"Office"+File.separator+"ProtocolHandler.xcu" ); - - String[] xmlArray = new String[50]; - try { - BufferedReader reader = new BufferedReader(new FileReader(in_file)); - count = -1; - for (String s = reader.readLine(); s != null; s = reader.readLine()) { //</oor:node> - count = count + 1; - xmlArray[count] = s; - } - reader.close(); - } - catch( IOException ioe ) { - String message = "\nError reading ProtocolHandler.xcu, please view SFrameworkInstall.log."; - System.out.println(message); - ioe.printStackTrace(); - statusLabel.setText(message); - return false; - } - - in_file.delete(); - - out_file = new File( installPath+File.separator+"share"+File.separator+"registry"+File.separator+"data"+File.separator+"org"+File.separator+"openoffice"+File.separator+"Office"+File.separator+"ProtocolHandler.xcu" ); - out_file.createNewFile(); - out = new FileWriter( out_file ); - - for(int i=0; i<count + 1; i++) { - out.write(xmlArray[i]+"\n"); - if( ( xmlArray[i].indexOf( "<node oor:name=\"HandlerSet\">" ) != -1 ) && ( xmlArray[i+1].indexOf( "ScriptProtocolHandler" ) == -1 ) ) { - out.write( " <node oor:name=\"com.sun.star.comp.ScriptProtocolHandler\" oor:op=\"replace\">\n" ); - out.write( " <prop oor:name=\"Protocols\">\n" ); - out.write( " <value>script:*</value>\n" ); - out.write( " </prop>\n" ); - out.write( " </node>\n" ); - } - } - } - catch( Exception e ) { - String message = "\nError updating ProtocolHandler.xcu, please view SFrameworkInstall.log."; - System.out.println(message); - e.printStackTrace(); - statusLabel.setText(message); - return false; - } - finally { - try { - out.close(); - System.out.println("File closed"); - } - catch(Exception e) { - System.out.println("Update ProtocolHandler Failed, please view SFrameworkInstall.log."); - System.err.println(e); - e.printStackTrace(); - } - } - return true; - }// updateProtocolHandler public static boolean updateScriptXLC( String installPath, JLabel statusLabel ) { diff --git a/scripting/workben/installer/IdeUpdater.java b/scripting/workben/installer/IdeUpdater.java index 3efe04e1f282..fe7b700d237d 100644 --- a/scripting/workben/installer/IdeUpdater.java +++ b/scripting/workben/installer/IdeUpdater.java @@ -64,52 +64,6 @@ public class IdeUpdater extends Thread { }// XmlUpdater - public boolean checkStop() - { - if (internalThread == Thread.currentThread()) - return false; - return true; - }// checkStop - - - public void checkSuspend() - { - if (threadSuspended) - { - synchronized(this) - { - while (threadSuspended) - { - try { - wait(); - } catch (InterruptedException eInt) { - - } - } - } - } - }// checkSuspend - - - public void setSuspend() - { - threadSuspended = true; - }// setSuspend - - - public void setResume() - { - threadSuspended = false; - notify(); - }// setResume - - - public void setStop() - { - internalThread = null; - }// setStop - - @Override public void run() { diff --git a/scripting/workben/installer/IdeVersion.java b/scripting/workben/installer/IdeVersion.java index 32e77552165e..6c1df1ce866c 100644 --- a/scripting/workben/installer/IdeVersion.java +++ b/scripting/workben/installer/IdeVersion.java @@ -316,9 +316,7 @@ class MyTableModelIDE extends AbstractTableModel { fireTableCellUpdated(row, col); } - String [] getSelected() { - return null; - } + public boolean isAnySelected() { Iterator iter = data.iterator(); diff --git a/scripting/workben/installer/InstUtil.java b/scripting/workben/installer/InstUtil.java index ed9fd928e17b..af29db64c3ce 100644 --- a/scripting/workben/installer/InstUtil.java +++ b/scripting/workben/installer/InstUtil.java @@ -91,15 +91,7 @@ public class InstUtil { } - public static boolean hasJeditInstallation() { - boolean result = false; - result = checkForSupportedVersion( getJeditLocation(), versions ); - if ( !result ) - { - System.out.println("No supported version for JEdit found."); - } - return result; - } + diff --git a/scripting/workben/installer/InstallWizard.java b/scripting/workben/installer/InstallWizard.java index c9d73ba7c126..26459d4664b7 100644 --- a/scripting/workben/installer/InstallWizard.java +++ b/scripting/workben/installer/InstallWizard.java @@ -290,25 +290,13 @@ public class InstallWizard extends javax.swing.JFrame implements ActionListener System.err.println("-bindings will only install the menu & key bindings in user/config/soffice.cfg."); } - public static synchronized boolean isPatchedTypes() - { - return bPatchedTypes; - } - public static synchronized boolean isPatchedJava() - { - return bPatchedJava; - } - public static synchronized boolean isPatchedRDB() - { - return bPatchedRDB; - } - public static synchronized boolean isInstallStarted() - { - return bInstallStarted; - } + + + + public static synchronized void setPatchedTypes(boolean value) { @@ -330,25 +318,13 @@ public class InstallWizard extends javax.swing.JFrame implements ActionListener bInstallStarted = value; } - public static synchronized void setTypesPath(String path) - { - typesPath = path; - } - public static synchronized void setJavaPath(String path) - { - javaPath = path; - } - public static synchronized String getTypesPath() - { - return typesPath; - } - public static synchronized String getJavaPath() - { - return javaPath; - } + + + + private javax.swing.JPanel navigation; private javax.swing.JButton navBack; diff --git a/scripting/workben/installer/NavPanel.java b/scripting/workben/installer/NavPanel.java index af2b21f45046..d8718e1257d1 100644 --- a/scripting/workben/installer/NavPanel.java +++ b/scripting/workben/installer/NavPanel.java @@ -103,15 +103,9 @@ public class NavPanel extends JPanel implements ActionListener { navCancel.addActionListener(listener); } - public void removeNextListener(ActionListener listener) - { - navNext.removeActionListener(listener); - } - public void removeBackListener(ActionListener listener) - { - navBack.removeActionListener(listener); - } + + public void removeCancelListener(ActionListener listener) { diff --git a/scripting/workben/installer/Version.java b/scripting/workben/installer/Version.java index 40ec3c8dbef1..38da3f21befb 100644 --- a/scripting/workben/installer/Version.java +++ b/scripting/workben/installer/Version.java @@ -328,9 +328,7 @@ class MyTableModel extends AbstractTableModel { fireTableCellUpdated(row, col); } - String [] getSelected() { - return null; - } + public boolean isAnySelected() { Iterator iter = data.iterator(); diff --git a/scripting/workben/installer/XmlUpdater.java b/scripting/workben/installer/XmlUpdater.java index 8c5763a3b05f..3424cd57d110 100644 --- a/scripting/workben/installer/XmlUpdater.java +++ b/scripting/workben/installer/XmlUpdater.java @@ -106,35 +106,8 @@ public class XmlUpdater extends Thread { }// XmlUpdater - public boolean checkStop() - { - if (internalThread == Thread.currentThread()) - return false; - return true; - }// checkStop - - - public void checkSuspend() - { - if (threadSuspended) { - synchronized(this) { - while (threadSuspended) { - try { - wait(); - } catch (InterruptedException eInt) { - - } - } - } - } - }// checkSuspend - public void setSuspend() - { - threadSuspended = true; - }// setSuspend - public void setResume() { @@ -143,12 +116,6 @@ public class XmlUpdater extends Thread { }// setResume - public void setStop() - { - internalThread = null; - }// setStop - - @Override public void run() { |