diff options
author | Noel Grandin <noel@peralex.com> | 2014-08-11 15:58:09 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-08-14 10:59:48 +0200 |
commit | ac5954d7c540f34702033d7d951d1d16cb96730a (patch) | |
tree | 310ba9698a10c74662de0714db683f932de32b0c /scripting | |
parent | 89c0a2b2f65beeb6f42d3334662100a13169a8d6 (diff) |
java: remove commented out code
Change-Id: I05c907a38b562231e968c17f14e09ef80e0a6ed1
Diffstat (limited to 'scripting')
13 files changed, 1 insertions, 124 deletions
diff --git a/scripting/examples/java/Newsgroup/OfficeAttachment.java b/scripting/examples/java/Newsgroup/OfficeAttachment.java index c6b6fc9befab..41ccfd3dd591 100644 --- a/scripting/examples/java/Newsgroup/OfficeAttachment.java +++ b/scripting/examples/java/Newsgroup/OfficeAttachment.java @@ -60,7 +60,6 @@ public class OfficeAttachment String firstPart = templocationURL.substring( 0, sepPos ); String lastPart = templocationURL.substring( sepPos + 1, templocationURL.length() ); templocationURL = firstPart + "/" + lastPart; - //JOptionPane.showMessageDialog( null, "Temp Location URL is: " + templocationURL + "\nfirstPart is: " + firstPart + "\nlastPart is: " + lastPart ); } } @@ -86,7 +85,6 @@ public class OfficeAttachment } else { - //int lastSep = attachmentName.lastIndexOf( System.getProperty( "file.separator" ) ); int lastSep = attachmentName.lastIndexOf( "/" ); attachmentName = attachmentName.substring( lastSep + 1, attachmentName.length() ); int dot = attachmentName.indexOf( "." ); @@ -147,18 +145,12 @@ public class OfficeAttachment { if( homefiles[i].getName().equals( attachmentName + ".sxw" ) ) { - //officeFile = new File( homefiles[i].getAbsolutePath() ); - //JOptionPane.showMessageDialog( null, "Found .sxw" ); file = homefiles[i].getAbsolutePath(); } } officeFile = new File( file ); - //officeFile = new File( filename + ".sxw" ); - //officeFile = new File (storedDoc.getLocation() ); } - //status.setStatus( 10, "Attachments successfully created" ); - } catch( SecurityException se ) { @@ -255,14 +247,6 @@ public class OfficeAttachment public File[] getAttachments() { - /* - if( htmlFile == null && officeFile == null ) - { - System.out.println( "Error: Document(s) have not been saved." ); - return null; - } - */ - //(officeDoc) ? (number = 2) : (number = 1); statusLine = "Retrieving temp docs"; status.setStatus( 8, statusLine ); diff --git a/scripting/examples/java/Newsgroup/PostNewsgroup.java b/scripting/examples/java/Newsgroup/PostNewsgroup.java index 5f069b44dd19..83e90ad5aa36 100644 --- a/scripting/examples/java/Newsgroup/PostNewsgroup.java +++ b/scripting/examples/java/Newsgroup/PostNewsgroup.java @@ -381,7 +381,6 @@ public class PostNewsgroup extends JFrame } JPanel optionPanel = new JPanel(); - //optionPanel.setLayout( new GridLayout( 1, 3, 20, 0 ) ); optionPanel.setBorder( new TitledBorder( new EtchedBorder(), "Document Format" ) ); optionPanel.setLayout( new GridBagLayout() ); GridBagConstraints constraints = new GridBagConstraints(); @@ -423,7 +422,6 @@ public class PostNewsgroup extends JFrame StatusWindow statusWindow = new StatusWindow( window, "Posting to Newsgroup", FRAMEX, FRAMEY ); statusWindow.setVisible( true ); - //statusWindow.requestFocusInWindow(); statusLine = "Ready to send..."; statusWindow.setStatus( 0, statusLine ); @@ -456,7 +454,6 @@ public class PostNewsgroup extends JFrame } else { - //int position = newsgroupComboBox.getSelectedIndex(); host = subscribedNewsgroups[ position ].getHostName(); group = subscribedNewsgroups[ position ].getNewsgroupName(); } @@ -585,7 +582,6 @@ public class PostNewsgroup extends JFrame } else { - //int position = newsgroupComboBox.getSelectedIndex(); newsgroupString = subscribedNewsgroups[ position ].getNewsgroupName(); } if( newsgroupString.length() == 0 ) diff --git a/scripting/examples/java/Newsgroup/StatusWindow.java b/scripting/examples/java/Newsgroup/StatusWindow.java index e83b7ef5c98e..b95fb3a91b07 100644 --- a/scripting/examples/java/Newsgroup/StatusWindow.java +++ b/scripting/examples/java/Newsgroup/StatusWindow.java @@ -69,9 +69,7 @@ public class StatusWindow extends JFrame statusLabel.setColumns( 25 ); statusLabel.setEditable( false ); statusLabel.setBorder( null ); - //statusLabel.setBorder( LineBorder.createGrayLineBorder() ); JPanel statusPanel = new JPanel(); - //statusPanel.setBorder( LineBorder.createBlackLineBorder() ); statusPanel.setLayout( new BorderLayout() ); statusPanel.add( statusLabel, "West" ); @@ -120,7 +118,6 @@ public class StatusWindow extends JFrame this.pack(); this.setResizable( false ); - //this.setVisible( true ); } diff --git a/scripting/examples/java/Newsgroup/SubscribedNewsgroups.java b/scripting/examples/java/Newsgroup/SubscribedNewsgroups.java index e73ea3310eca..a4f230becee7 100644 --- a/scripting/examples/java/Newsgroup/SubscribedNewsgroups.java +++ b/scripting/examples/java/Newsgroup/SubscribedNewsgroups.java @@ -88,7 +88,6 @@ public class SubscribedNewsgroups { } // Check that at least one News directory exists and remove nulls boolean newsFound = false; - //Vector nonNullNews = new Vector(); for( int i=0; i < allNewsDirs.length; i++ ) { if( allNewsDirs[i] != null ) { newsFound = true; diff --git a/scripting/java/com/sun/star/script/framework/browse/ParcelBrowseNode.java b/scripting/java/com/sun/star/script/framework/browse/ParcelBrowseNode.java index 437b3265345b..12be9bc19592 100644 --- a/scripting/java/com/sun/star/script/framework/browse/ParcelBrowseNode.java +++ b/scripting/java/com/sun/star/script/framework/browse/ParcelBrowseNode.java @@ -100,7 +100,6 @@ public class ParcelBrowseNode extends PropertySet catch ( com.sun.star.uno.Exception e ) { // TODO propagate potential errors - // Pthrow new com.sun.star.uno.RuntimeException( e.toString() ); LogUtils.DEBUG( "Caught exception creating ParcelBrowseNode " + e ); LogUtils.DEBUG( LogUtils.getTrace( e ) ); } diff --git a/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptProviderForJavaScript.java b/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptProviderForJavaScript.java index 6f1e136959b5..208ee4766d67 100644 --- a/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptProviderForJavaScript.java +++ b/scripting/java/com/sun/star/script/framework/provider/javascript/ScriptProviderForJavaScript.java @@ -279,7 +279,6 @@ class ScriptImpl implements XScript catch (JavaScriptException jse) { LogUtils.DEBUG( "Caught JavaScriptException exception for JavaScript type = " + jse.getClass() ); String message = jse.getMessage(); - //int lineNo = jse.getLineNumber(); Object wrap = jse.getValue(); LogUtils.DEBUG( "\t message " + message ); LogUtils.DEBUG( "\t wrapped type " + wrap.getClass() ); diff --git a/scripting/java/org/openoffice/idesupport/filter/BinaryOnlyFilter.java b/scripting/java/org/openoffice/idesupport/filter/BinaryOnlyFilter.java index 9f4610bb252d..a78ef0e11191 100644 --- a/scripting/java/org/openoffice/idesupport/filter/BinaryOnlyFilter.java +++ b/scripting/java/org/openoffice/idesupport/filter/BinaryOnlyFilter.java @@ -38,13 +38,6 @@ public class BinaryOnlyFilter implements FileFilter { @Override public String toString() { - /* StringBuffer buf = new StringBuffer(DESCRIPTION + ": "); - - for (int i = 0; i < EXTENSIONS.length - 1; i++) - buf.append("<" + EXTENSIONS[i] + "> "); - buf.append("<" + EXTENSIONS[EXTENSIONS.length - 1] + ">"); - - return buf.toString(); */ return DESCRIPTION; } } diff --git a/scripting/java/org/openoffice/netbeans/modules/office/filesystem/OpenOfficeDocFileSystem.java b/scripting/java/org/openoffice/netbeans/modules/office/filesystem/OpenOfficeDocFileSystem.java index dac253f470f2..1a73873cb243 100644 --- a/scripting/java/org/openoffice/netbeans/modules/office/filesystem/OpenOfficeDocFileSystem.java +++ b/scripting/java/org/openoffice/netbeans/modules/office/filesystem/OpenOfficeDocFileSystem.java @@ -110,7 +110,6 @@ public class OpenOfficeDocFileSystem attr = defattr; list = defattr; - // transfer = new TransferImpl(); setRefreshTime(REFRESH_OFF); } @@ -1032,9 +1031,7 @@ System.out.println(" exception: " + ioe.getMessage()); public void rename(String name) throws IOException { -// throw new IOException( -// "cannot rename readonly file: " + getName()); // I18N - // BUG: this is the design bug. Cache has to mamage such kind + // BUG: this is the design bug. Cache has to manage such kind // of operation in order to keep the data integrity. this.name = name; } diff --git a/scripting/java/org/openoffice/netbeans/modules/office/nodes/ScriptNode.java b/scripting/java/org/openoffice/netbeans/modules/office/nodes/ScriptNode.java index f4f83409d34d..3e95cef8949c 100644 --- a/scripting/java/org/openoffice/netbeans/modules/office/nodes/ScriptNode.java +++ b/scripting/java/org/openoffice/netbeans/modules/office/nodes/ScriptNode.java @@ -117,82 +117,7 @@ public class ScriptNode extends AbstractNode { return value; } - /* public void setValue(Object obj) { - System.out.println("Setting value to: " + obj.toString()); - - if ((value instanceof String) != true) - throw new IllegalArgumentException(name + - " property must be of type String"); - - value = obj.toString(); - if (name.equals(LOGICAL_NAME)) { - sn.setName(value); - sn.setDisplayName(value.substring(value.lastIndexOf(".") + 1)); - sn.setShortDescription(value); - } - } */ } - /* public boolean canRename() { - return true; - } - - public void setName(String nue) { - // Update visible name, fire property changes: - super.setName(nue); - } */ - - /* - public boolean canDestroy() { - return true; - } - public void destroy() throws IOException { - // Actually remove the node itself and fire property changes: - super.destroy(); - // perform additional actions, i.e. delete underlying object - } */ - - // Handle copying and cutting specially: - /* - public boolean canCopy() { - return true; - } - public boolean canCut() { - return true; - } - public Transferable clipboardCopy() { - // Add to, do not replace, the default node copy flavor: - ExTransferable et = ExTransferable.create(super.clipboardCopy()); - et.put(new ExTransferable.Single(DataFlavor.stringFlavor) { - protected Object getData() { - return ScriptNode.this.getDisplayName(); - } - }); - return et; - } - public Transferable clipboardCut() { - // Add to, do not replace, the default node cut flavor: - ExTransferable et = ExTransferable.create(super.clipboardCut()); - // This is not so useful because this node will not be destroyed afterwards - // (it is up to the paste type to decide whether to remove the "original", - // and it is not safe to assume that getData will only be called once): - et.put(new ExTransferable.Single(DataFlavor.stringFlavor) { - protected Object getData() { - return ScriptNode.this.getDisplayName(); - } - }); - return et; - } - */ - - // Permit user to customize whole node at once (instead of per-property): - /* - public boolean hasCustomizer() { - return true; - } - public Component getCustomizer() { - return new MyCustomizingPanel(this); - } - */ } diff --git a/scripting/java/org/openoffice/netbeans/modules/office/wizard/ParcelContentsIterator.java b/scripting/java/org/openoffice/netbeans/modules/office/wizard/ParcelContentsIterator.java index 7fbcd34bfe97..a48ff2d1592f 100644 --- a/scripting/java/org/openoffice/netbeans/modules/office/wizard/ParcelContentsIterator.java +++ b/scripting/java/org/openoffice/netbeans/modules/office/wizard/ParcelContentsIterator.java @@ -62,8 +62,6 @@ public class ParcelContentsIterator implements TemplateWizard.Iterator { protected WizardDescriptor.Panel[] createPanels() { return new WizardDescriptor.Panel[] { - // keep the default 2nd panel: - // wiz.targetChooser(), new ParcelPropertiesPanel(), }; } diff --git a/scripting/workben/installer/ExecCmd.java b/scripting/workben/installer/ExecCmd.java index 9dc7613942b7..c812ae6229b7 100644 --- a/scripting/workben/installer/ExecCmd.java +++ b/scripting/workben/installer/ExecCmd.java @@ -75,7 +75,6 @@ public class ExecCmd String buff = null; while ((buff = br_err.readLine()) != null) { System.out.println("Process err :" + buff); - /*try {Thread.sleep(100); } catch(Exception e) {}*/ } System.out.println("finished reading err"); } catch (IOException ioe) { diff --git a/scripting/workben/installer/IdeVersion.java b/scripting/workben/installer/IdeVersion.java index 6c1df1ce866c..72635e25c721 100644 --- a/scripting/workben/installer/IdeVersion.java +++ b/scripting/workben/installer/IdeVersion.java @@ -47,10 +47,7 @@ public class IdeVersion extends javax.swing.JPanel implements ActionListener, Ta try { - //props = InstUtil.getNetbeansLocation(); - Properties netbeansProps = InstUtil.getNetbeansLocation(); - //Properties jeditProps = InstUtil.getJeditLocation(); Properties ideProps = new Properties(); if(netbeansProps!=null ) { diff --git a/scripting/workben/installer/InstallWizard.java b/scripting/workben/installer/InstallWizard.java index 26459d4664b7..c02f5f13b904 100644 --- a/scripting/workben/installer/InstallWizard.java +++ b/scripting/workben/installer/InstallWizard.java @@ -87,10 +87,8 @@ public class InstallWizard extends javax.swing.JFrame implements ActionListener exitForm(); } - //setBackground(Color.WHITE); setBackground(new Color(0,0,0)); locations = new ArrayList<String>(); - //Point center = GraphicsEnvironment.getLocalGraphicsEnvironment().getCenterPoint(); Point center = new Point( 400, 400 ); int windowWidth=200; int windowHeight=300; @@ -133,9 +131,6 @@ public class InstallWizard extends javax.swing.JFrame implements ActionListener gridBagConstraints1 = new java.awt.GridBagConstraints(); gridBagConstraints1.gridx = 6; gridBagConstraints1.gridy = 0; - //navigation.add(navNext, gridBagConstraints1); - //navigation.add(navBack, gridBagConstraints1); - //navigation.add(navCancel, gridBagConstraints1); getContentPane().add(navigation, java.awt.BorderLayout.SOUTH); screens.setLayout(new java.awt.CardLayout()); @@ -145,7 +140,6 @@ public class InstallWizard extends javax.swing.JFrame implements ActionListener _final = new Final(this); screens.add(FINAL, _final); - //boolean hasIDEInstallation = (InstUtil.hasNetbeansInstallation() || InstUtil.hasJeditInstallation()) ; boolean hasIDEInstallation = ( InstUtil.hasNetbeansInstallation() ) ; if( hasIDEInstallation ) |