You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@directory.apache.org by el...@apache.org on 2017/10/24 12:24:29 UTC
svn commit: r1813172 - in /directory/studio/branches/studio-value/plugins:
ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/
ldapbrowser.ui/
ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/...
Author: elecharny
Date: Tue Oct 24 12:24:28 2017
New Revision: 1813172
URL: http://svn.apache.org/viewvc?rev=1813172&view=rev
Log:
o Added some comments in the plugin.xml
o A bit of cleanup
Modified:
directory/studio/branches/studio-value/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryWizard.java
directory/studio/branches/studio-value/plugins/ldapbrowser.ui/plugin.xml
directory/studio/branches/studio-value/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/NewSearchWizard.java
Modified: directory/studio/branches/studio-value/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryWizard.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-value/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryWizard.java?rev=1813172&r1=1813171&r2=1813172&view=diff
==============================================================================
--- directory/studio/branches/studio-value/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryWizard.java (original)
+++ directory/studio/branches/studio-value/plugins/ldapbrowser.common/src/main/java/org/apache/directory/studio/ldapbrowser/common/wizards/NewEntryWizard.java Tue Oct 24 12:24:28 2017
@@ -90,7 +90,6 @@ public class NewEntryWizard extends Wiza
*/
public NewEntryWizard()
{
- //setWindowTitle( "New Entry" );
setNeedsProgressMonitor( true );
}
@@ -105,14 +104,13 @@ public class NewEntryWizard extends Wiza
return BrowserCommonConstants.WIZARD_NEW_ENTRY_WIZARD;
}
-
/**
* {@inheritDoc}
*/
public void init( IWorkbench workbench, IStructuredSelection selection )
{
// determine the currently selected entry
- Object o = selection.getFirstElement();
+ Object selected = selection.getFirstElement();
if ( isNewContextEntry() )
{
@@ -123,55 +121,55 @@ public class NewEntryWizard extends Wiza
setWindowTitle( Messages.getString( "NewEntryWizard.NewEntry" ) ); //$NON-NLS-1$
}
- if ( o instanceof IEntry )
+ if ( selected instanceof IEntry )
{
- selectedEntry = ( ( IEntry ) o );
+ selectedEntry = ( ( IEntry ) selected );
selectedConnection = selectedEntry.getBrowserConnection();
}
- else if ( o instanceof ISearchResult )
+ else if ( selected instanceof ISearchResult )
{
- selectedEntry = ( ( ISearchResult ) o ).getEntry();
+ selectedEntry = ( ( ISearchResult ) selected ).getEntry();
selectedConnection = selectedEntry.getBrowserConnection();
}
- else if ( o instanceof IBookmark )
+ else if ( selected instanceof IBookmark )
{
- selectedEntry = ( ( IBookmark ) o ).getEntry();
+ selectedEntry = ( ( IBookmark ) selected ).getEntry();
selectedConnection = selectedEntry.getBrowserConnection();
}
- else if ( o instanceof IAttribute )
+ else if ( selected instanceof IAttribute )
{
- selectedEntry = ( ( IAttribute ) o ).getEntry();
+ selectedEntry = ( ( IAttribute ) selected ).getEntry();
selectedConnection = selectedEntry.getBrowserConnection();
}
- else if ( o instanceof IValue )
+ else if ( selected instanceof IValue )
{
- selectedEntry = ( ( IValue ) o ).getAttribute().getEntry();
+ selectedEntry = ( ( IValue ) selected ).getAttribute().getEntry();
selectedConnection = selectedEntry.getBrowserConnection();
}
- else if ( o instanceof ISearch )
+ else if ( selected instanceof ISearch )
{
selectedEntry = null;
- selectedConnection = ( ( ISearch ) o ).getBrowserConnection();
+ selectedConnection = ( ( ISearch ) selected ).getBrowserConnection();
}
- else if ( o instanceof IBrowserConnection )
+ else if ( selected instanceof IBrowserConnection )
{
selectedEntry = null;
- selectedConnection = ( IBrowserConnection ) o;
+ selectedConnection = ( IBrowserConnection ) selected;
}
- else if ( o instanceof BrowserCategory )
+ else if ( selected instanceof BrowserCategory )
{
selectedEntry = null;
- selectedConnection = ( ( BrowserCategory ) o ).getParent();
+ selectedConnection = ( ( BrowserCategory ) selected ).getParent();
}
- else if ( o instanceof BrowserSearchResultPage )
+ else if ( selected instanceof BrowserSearchResultPage )
{
selectedEntry = null;
- selectedConnection = ( ( BrowserSearchResultPage ) o ).getSearch().getBrowserConnection();
+ selectedConnection = ( ( BrowserSearchResultPage ) selected ).getSearch().getBrowserConnection();
}
- else if ( o instanceof BrowserEntryPage )
+ else if ( selected instanceof BrowserEntryPage )
{
selectedEntry = null;
- selectedConnection = ( ( BrowserEntryPage ) o ).getEntry().getBrowserConnection();
+ selectedConnection = ( ( BrowserEntryPage ) selected ).getEntry().getBrowserConnection();
}
else
{
@@ -186,6 +184,7 @@ public class NewEntryWizard extends Wiza
originalReadOnlyFlag = selectedConnection.getConnection().isReadOnly();
selectedConnection.getConnection().setReadOnly( true );
}
+
prototypeEntry = new DummyEntry( new Dn(), selectedConnection );
}
}
@@ -233,16 +232,19 @@ public class NewEntryWizard extends Wiza
PlatformUI.getWorkbench().getHelpSystem().setHelp( typePage.getControl(),
BrowserCommonConstants.PLUGIN_ID + "." + "tools_newentry_wizard" ); //$NON-NLS-1$ //$NON-NLS-2$
}
+
if ( ocPage != null )
{
PlatformUI.getWorkbench().getHelpSystem().setHelp( ocPage.getControl(),
BrowserCommonConstants.PLUGIN_ID + "." + "tools_newentry_wizard" ); //$NON-NLS-1$ //$NON-NLS-2$
}
+
if ( dnPage != null )
{
PlatformUI.getWorkbench().getHelpSystem().setHelp( dnPage.getControl(),
BrowserCommonConstants.PLUGIN_ID + "." + "tools_newentry_wizard" ); //$NON-NLS-1$ //$NON-NLS-2$
}
+
if ( attributePage != null )
{
PlatformUI.getWorkbench().getHelpSystem().setHelp( attributePage.getControl(),
@@ -318,9 +320,11 @@ public class NewEntryWizard extends Wiza
CreateEntryRunnable runnable = new CreateEntryRunnable( prototypeEntry, selectedConnection );
IStatus status = RunnableContextRunner.execute( runnable, getContainer(), true );
+
if ( !status.isOK() )
{
selectedConnection.getConnection().setReadOnly( true );
+
return false;
}
else
Modified: directory/studio/branches/studio-value/plugins/ldapbrowser.ui/plugin.xml
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-value/plugins/ldapbrowser.ui/plugin.xml?rev=1813172&r1=1813171&r2=1813172&view=diff
==============================================================================
--- directory/studio/branches/studio-value/plugins/ldapbrowser.ui/plugin.xml (original)
+++ directory/studio/branches/studio-value/plugins/ldapbrowser.ui/plugin.xml Tue Oct 24 12:24:28 2017
@@ -38,7 +38,13 @@
</perspectiveExtension>
</extension>
- <!-- The supported editors -->
+ <!-- The supported editors : -->
+ <!-- o Single tab -->
+ <!-- o Single tab LDIF -->
+ <!-- o Multi tab -->
+ <!-- o Multi tab LDIF -->
+ <!-- o Search result -->
+ <!-- o Browser -->
<extension
point="org.eclipse.ui.editors">
<editor
@@ -89,7 +95,11 @@
name="%Editor_SchemaBrowser_name"/>
</extension>
- <!-- The supported views -->
+ <!-- The supported views -->
+ <!-- o Connection -->
+ <!-- o Browser -->
+ <!-- o Modification logs -->
+ <!-- o Search logs tab -->
<extension
point="org.eclipse.ui.views">
<category
@@ -128,16 +138,30 @@
name="%View_SearchLogsView_name"/>
</extension>
- <!-- The new wizards -->
+ <!-- The new wizards -->
+ <!-- o Batch Operation -->
+ <!-- o Bookmark -->
+ <!-- o Context Entry -->
+ <!-- o Entry -->
+ <!-- o Search -->
<extension
point="org.eclipse.ui.newWizards">
<wizard
category="%NewWizards_Category_id"
- class="org.apache.directory.studio.ldapbrowser.common.wizards.NewEntryWizard"
+ class="org.apache.directory.studio.ldapbrowser.ui.wizards.BatchOperationWizard"
hasPages="true"
- icon="resources/icons/entry_add.gif"
- id="org.apache.directory.studio.ldapbrowser.common.wizards.NewEntryWizard"
- name="%NewWizard_NewEntryWizard_name"
+ icon="resources/icons/batch.gif"
+ id="%NewWizard_BatchOperationWizard_id"
+ name="%NewWizard_BatchOperationWizard_name"
+ project="false"/>
+
+ <wizard
+ category="%NewWizards_Category_id"
+ class="org.apache.directory.studio.ldapbrowser.ui.wizards.NewBookmarkWizard"
+ hasPages="true"
+ icon="resources/icons/bookmark_add.gif"
+ id="%NewWizard_NewBookmarkWizard_id"
+ name="%NewWizard_NewBookmarkWizard_name"
project="false"/>
<wizard
@@ -148,7 +172,16 @@
id="%NewWizard_NewContextEntryWizard_id"
name="%NewWizard_NewContextEntryWizard_name"
project="false"/>
-
+
+ <wizard
+ category="%NewWizards_Category_id"
+ class="org.apache.directory.studio.ldapbrowser.common.wizards.NewEntryWizard"
+ hasPages="true"
+ icon="resources/icons/entry_add.gif"
+ id="org.apache.directory.studio.ldapbrowser.common.wizards.NewEntryWizard"
+ name="%NewWizard_NewEntryWizard_name"
+ project="false"/>
+
<wizard
canFinishEarly="true"
category="%NewWizards_Category_id"
@@ -158,26 +191,11 @@
id="%NewWizard_NewSearchWizard_id"
name="%NewWizard_NewSearchWizard_name"
project="false"/>
-
- <wizard
- category="%NewWizards_Category_id"
- class="org.apache.directory.studio.ldapbrowser.ui.wizards.NewBookmarkWizard"
- hasPages="true"
- icon="resources/icons/bookmark_add.gif"
- id="%NewWizard_NewBookmarkWizard_id"
- name="%NewWizard_NewBookmarkWizard_name"
- project="false"/>
-
- <wizard
- category="%NewWizards_Category_id"
- class="org.apache.directory.studio.ldapbrowser.ui.wizards.BatchOperationWizard"
- hasPages="true"
- icon="resources/icons/batch.gif"
- id="%NewWizard_BatchOperationWizard_id"
- name="%NewWizard_BatchOperationWizard_name"
- project="false"/>
</extension>
+ <!-- The import wizards -->
+ <!-- o LDIF -->
+ <!-- o DSML -->
<extension
point="org.eclipse.ui.importWizards">
<category
@@ -213,7 +231,13 @@
</wizard>
</extension>
- <extension
+ <!-- The export wizards -->
+ <!-- o LDIF format -->
+ <!-- o DSML format -->
+ <!-- o CSV Format -->
+ <!-- o Excel format -->
+ <!-- o ODF format -->
+ <extension
point="org.eclipse.ui.exportWizards">
<category
id="%ExportWizards_Category_id"
@@ -305,6 +329,11 @@
<initializer class="org.apache.directory.studio.ldapbrowser.ui.BrowserUIPreferencesInitializer"/>
</extension>
+ <!-- The Preference pages -->
+ <!-- o SearchResult -->
+ <!-- o Modification logs -->
+ <!-- o Search logs -->
+ <!-- o Entry editors -->
<extension
point="org.eclipse.ui.preferencePages">
<page
@@ -340,6 +369,15 @@
</page>
</extension>
+
+ <!-- The Property pages -->
+ <!-- o Attribute -->
+ <!-- o Bookmark -->
+ <!-- o Entry -->
+ <!-- o RootDSE -->
+ <!-- o Schema -->
+ <!-- o Search -->
+ <!-- o Value -->
<extension
point="org.eclipse.ui.propertyPages">
<page
@@ -408,6 +446,18 @@
</page>
</extension>
+ <!-- The Actions -->
+ <!-- o Open Schema Browser -->
+ <!-- o New Connection -->
+ <!-- o New Entry -->
+ <!-- o New Attribute -->
+ <!-- o New Value -->
+ <!-- o New Search -->
+ <!-- o New Bookmark -->
+ <!-- o New Batch Operation -->
+ <!-- o New Ldif -->
+ <!-- o Open encoder/decoder -->
+ <!-- o Navigate to DN -->
<extension
point="org.eclipse.ui.actionSets">
<actionSet
@@ -544,6 +594,11 @@
</decorator>
</extension>
+ <!-- The supported entry editors : -->
+ <!-- o Single tab -->
+ <!-- o Single tab LDIF -->
+ <!-- o Multi tab -->
+ <!-- o Multi tab LDIF -->
<extension
point="org.apache.directory.studio.entryeditors">
<entryEditor
Modified: directory/studio/branches/studio-value/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/NewSearchWizard.java
URL: http://svn.apache.org/viewvc/directory/studio/branches/studio-value/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/NewSearchWizard.java?rev=1813172&r1=1813171&r2=1813172&view=diff
==============================================================================
--- directory/studio/branches/studio-value/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/NewSearchWizard.java (original)
+++ directory/studio/branches/studio-value/plugins/ldapbrowser.ui/src/main/java/org/apache/directory/studio/ldapbrowser/ui/wizards/NewSearchWizard.java Tue Oct 24 12:24:28 2017
@@ -39,7 +39,6 @@ import org.eclipse.ui.IWorkbenchWindow;
*/
public class NewSearchWizard extends Wizard implements INewWizard
{
-
/** The window. */
private IWorkbenchWindow window;
@@ -49,6 +48,7 @@ public class NewSearchWizard extends Wiz
*/
public NewSearchWizard()
{
+ // Nothing to do
}
@@ -87,7 +87,7 @@ public class NewSearchWizard extends Wiz
public boolean performFinish()
{
NewSearchUI.openSearchDialog( window, SearchPage.getId() );
+
return true;
}
-
}