You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by pa...@apache.org on 2008/06/02 10:04:17 UTC
svn commit: r662358 - in
/directory/studio/branches/apacheds-plugin-branch/apacheds/src/main/java/org/apache/directory/studio/apacheds:
./ actions/ jobs/ model/
Author: pamarcelot
Date: Mon Jun 2 01:04:16 2008
New Revision: 662358
URL: http://svn.apache.org/viewvc?rev=662358&view=rev
Log:
Fixed some "// TODO" tags.
Modified:
directory/studio/branches/apacheds-plugin-branch/apacheds/src/main/java/org/apache/directory/studio/apacheds/ApacheDsPluginUtils.java
directory/studio/branches/apacheds-plugin-branch/apacheds/src/main/java/org/apache/directory/studio/apacheds/actions/OpenConfigurationAction.java
directory/studio/branches/apacheds-plugin-branch/apacheds/src/main/java/org/apache/directory/studio/apacheds/actions/StopAction.java
directory/studio/branches/apacheds-plugin-branch/apacheds/src/main/java/org/apache/directory/studio/apacheds/jobs/LaunchServerJob.java
directory/studio/branches/apacheds-plugin-branch/apacheds/src/main/java/org/apache/directory/studio/apacheds/model/Server.java
directory/studio/branches/apacheds-plugin-branch/apacheds/src/main/java/org/apache/directory/studio/apacheds/model/ServersHandler.java
Modified: directory/studio/branches/apacheds-plugin-branch/apacheds/src/main/java/org/apache/directory/studio/apacheds/ApacheDsPluginUtils.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/apacheds-plugin-branch/apacheds/src/main/java/org/apache/directory/studio/apacheds/ApacheDsPluginUtils.java?rev=662358&r1=662357&r2=662358&view=diff
==============================================================================
--- directory/studio/branches/apacheds-plugin-branch/apacheds/src/main/java/org/apache/directory/studio/apacheds/ApacheDsPluginUtils.java (original)
+++ directory/studio/branches/apacheds-plugin-branch/apacheds/src/main/java/org/apache/directory/studio/apacheds/ApacheDsPluginUtils.java Mon Jun 2 01:04:16 2008
@@ -30,6 +30,8 @@
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
+import org.eclipse.jface.dialogs.IDialogConstants;
+import org.eclipse.jface.dialogs.MessageDialog;
/**
@@ -109,8 +111,9 @@
}
catch ( IOException e )
{
- // TODO Auto-generated catch block
- e.printStackTrace();
+ ApacheDsPluginUtils.reportError( "An error occurred when copying the library '"
+ + apachedsLibraryFilename + "' to the location '" + apachedsLibrary.getAbsolutePath()
+ + "'.\n\n" + e.getMessage() );
}
}
}
@@ -235,8 +238,9 @@
}
catch ( IOException e )
{
- // TODO Auto-generated catch block
- e.printStackTrace();
+ ApacheDsPluginUtils
+ .reportError( "An error occurred when copying the default configuration files to the server's folder '"
+ + serverFolder.getAbsolutePath() + "'.\n\n" + e.getMessage() );
}
}
@@ -439,4 +443,20 @@
return ApacheDsPlugin.getDefault().getPreferenceStore().getString(
ApacheDsPluginConstants.PREFS_SERVER_LOGS_PATTERN );
}
+
+
+ /**
+ * Reports an error.
+ *
+ * @param message
+ * the message
+ */
+ public static void reportError( String message )
+ {
+
+ MessageDialog dialog = new MessageDialog( ApacheDsPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow()
+ .getShell(), "Error!", null, message, MessageDialog.ERROR, new String[]
+ { IDialogConstants.OK_LABEL }, MessageDialog.OK );
+ dialog.open();
+ }
}
Modified: directory/studio/branches/apacheds-plugin-branch/apacheds/src/main/java/org/apache/directory/studio/apacheds/actions/OpenConfigurationAction.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/apacheds-plugin-branch/apacheds/src/main/java/org/apache/directory/studio/apacheds/actions/OpenConfigurationAction.java?rev=662358&r1=662357&r2=662358&view=diff
==============================================================================
--- directory/studio/branches/apacheds-plugin-branch/apacheds/src/main/java/org/apache/directory/studio/apacheds/actions/OpenConfigurationAction.java (original)
+++ directory/studio/branches/apacheds-plugin-branch/apacheds/src/main/java/org/apache/directory/studio/apacheds/actions/OpenConfigurationAction.java Mon Jun 2 01:04:16 2008
@@ -91,7 +91,9 @@
}
catch ( PartInitException e )
{
- // TODO
+ ApacheDsPluginUtils
+ .reportError( "An error occurred when opening the Apache DS Configuration Editor.\n\n"
+ + e.getMessage() );
}
}
}
Modified: directory/studio/branches/apacheds-plugin-branch/apacheds/src/main/java/org/apache/directory/studio/apacheds/actions/StopAction.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/apacheds-plugin-branch/apacheds/src/main/java/org/apache/directory/studio/apacheds/actions/StopAction.java?rev=662358&r1=662357&r2=662358&view=diff
==============================================================================
--- directory/studio/branches/apacheds-plugin-branch/apacheds/src/main/java/org/apache/directory/studio/apacheds/actions/StopAction.java (original)
+++ directory/studio/branches/apacheds-plugin-branch/apacheds/src/main/java/org/apache/directory/studio/apacheds/actions/StopAction.java Mon Jun 2 01:04:16 2008
@@ -24,6 +24,7 @@
import org.apache.directory.studio.apacheds.ApacheDsPlugin;
import org.apache.directory.studio.apacheds.ApacheDsPluginConstants;
+import org.apache.directory.studio.apacheds.ApacheDsPluginUtils;
import org.apache.directory.studio.apacheds.ConsolesHandler;
import org.apache.directory.studio.apacheds.LogMessageConsole;
import org.apache.directory.studio.apacheds.jobs.LaunchServerJob;
@@ -101,8 +102,8 @@
}
catch ( DebugException e )
{
- // TODO Auto-generated catch block
- e.printStackTrace();
+ ApacheDsPluginUtils.reportError( "An error occurred when stopping the server.\n\n"
+ + e.getMessage() );
}
}
}
@@ -129,8 +130,9 @@
}
catch ( IOException e )
{
- // TODO Auto-generated catch block
- e.printStackTrace();
+ ApacheDsPluginUtils
+ .reportError( "An error occurred when writing to the Info console message stream.\n\n"
+ + e.getMessage() );
}
}
} );
Modified: directory/studio/branches/apacheds-plugin-branch/apacheds/src/main/java/org/apache/directory/studio/apacheds/jobs/LaunchServerJob.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/apacheds-plugin-branch/apacheds/src/main/java/org/apache/directory/studio/apacheds/jobs/LaunchServerJob.java?rev=662358&r1=662357&r2=662358&view=diff
==============================================================================
--- directory/studio/branches/apacheds-plugin-branch/apacheds/src/main/java/org/apache/directory/studio/apacheds/jobs/LaunchServerJob.java (original)
+++ directory/studio/branches/apacheds-plugin-branch/apacheds/src/main/java/org/apache/directory/studio/apacheds/jobs/LaunchServerJob.java Mon Jun 2 01:04:16 2008
@@ -130,10 +130,11 @@
{
overwriteServersLog4jPropertiesFile( port );
}
- catch ( IOException e1 )
+ catch ( IOException e )
{
- // TODO Auto-generated catch block
- e1.printStackTrace();
+ ApacheDsPluginUtils
+ .reportError( "An error occurred when overwriting the server's log4j.properties file.\n\n"
+ + e.getMessage() );
}
// Launching Apache DS
@@ -252,8 +253,9 @@
}
catch ( IOException e )
{
- // TODO Auto-generated catch block
- e.printStackTrace();
+ ApacheDsPluginUtils
+ .reportError( "An error occurred when writing to the Info console message stream.\n\n"
+ + e.getMessage() );
}
}
} );
@@ -444,8 +446,7 @@
}
catch ( CoreException e )
{
- // TODO Auto-generated catch block
- e.printStackTrace();
+ ApacheDsPluginUtils.reportError( "An error occurred when launching the server.\n\n" + e.getMessage() );
}
}
Modified: directory/studio/branches/apacheds-plugin-branch/apacheds/src/main/java/org/apache/directory/studio/apacheds/model/Server.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/apacheds-plugin-branch/apacheds/src/main/java/org/apache/directory/studio/apacheds/model/Server.java?rev=662358&r1=662357&r2=662358&view=diff
==============================================================================
--- directory/studio/branches/apacheds-plugin-branch/apacheds/src/main/java/org/apache/directory/studio/apacheds/model/Server.java (original)
+++ directory/studio/branches/apacheds-plugin-branch/apacheds/src/main/java/org/apache/directory/studio/apacheds/model/Server.java Mon Jun 2 01:04:16 2008
@@ -270,9 +270,11 @@
}
+ /* (non-Javadoc)
+ * @see org.eclipse.core.runtime.IAdaptable#getAdapter(java.lang.Class)
+ */
public Object getAdapter( Class adapter )
{
- // TODO Auto-generated method stub
return null;
}
}
Modified: directory/studio/branches/apacheds-plugin-branch/apacheds/src/main/java/org/apache/directory/studio/apacheds/model/ServersHandler.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/apacheds-plugin-branch/apacheds/src/main/java/org/apache/directory/studio/apacheds/model/ServersHandler.java?rev=662358&r1=662357&r2=662358&view=diff
==============================================================================
--- directory/studio/branches/apacheds-plugin-branch/apacheds/src/main/java/org/apache/directory/studio/apacheds/model/ServersHandler.java (original)
+++ directory/studio/branches/apacheds-plugin-branch/apacheds/src/main/java/org/apache/directory/studio/apacheds/model/ServersHandler.java Mon Jun 2 01:04:16 2008
@@ -34,9 +34,8 @@
import org.apache.commons.io.FileUtils;
import org.apache.directory.studio.apacheds.ApacheDsPlugin;
+import org.apache.directory.studio.apacheds.ApacheDsPluginUtils;
import org.eclipse.core.runtime.IPath;
-import org.eclipse.jface.dialogs.IDialogConstants;
-import org.eclipse.jface.dialogs.MessageDialog;
/**
@@ -274,16 +273,19 @@
}
catch ( FileNotFoundException e )
{
- reportError( "An error occured when loading the servers.\n\n" + e.getMessage() );
+ ApacheDsPluginUtils.reportError( "An error occured when loading the servers.\n\n"
+ + e.getMessage() );
}
catch ( ServersHandlerIOException e )
{
- reportError( "An error occured when loading the servers.\n\n" + e.getMessage() );
+ ApacheDsPluginUtils.reportError( "An error occured when loading the servers.\n\n"
+ + e.getMessage() );
}
}
else
{
- reportError( "An error occured when loading the servers.\n\n" + exceptionMessage );
+ ApacheDsPluginUtils.reportError( "An error occured when loading the servers.\n\n"
+ + exceptionMessage );
}
}
}
@@ -331,33 +333,17 @@
}
catch ( FileNotFoundException e )
{
- reportError( "An error occured when loading the servers.\n\n" + e.getMessage() );
+ ApacheDsPluginUtils.reportError( "An error occured when loading the servers.\n\n" + e.getMessage() );
}
catch ( IOException e )
{
- reportError( "An error occured when loading the servers.\n\n" + e.getMessage() );
+ ApacheDsPluginUtils.reportError( "An error occured when loading the servers.\n\n" + e.getMessage() );
}
}
}
/**
- * Reports an error.
- *
- * @param message
- * the message
- */
- private void reportError( String message )
- {
-
- MessageDialog dialog = new MessageDialog( ApacheDsPlugin.getDefault().getWorkbench().getActiveWorkbenchWindow()
- .getShell(), "Error!", null, message, MessageDialog.ERROR, new String[]
- { IDialogConstants.OK_LABEL }, MessageDialog.OK );
- dialog.open();
- }
-
-
- /**
* Gets the path to the server file.
*
* @return