RepositoryFile file = filesListPanel.getSelectedFileItems().get( 0 ).getRepositoryFile();
if ( file.getName().endsWith( ".analysisview.xaction" ) ) { //$NON-NLS-1$
openFile( file, COMMAND.RUN );
} else {
// check to see if a plugin supports editing
ContentTypePlugin plugin = PluginOptionsHelper.getContentTypePlugin( file.getName() );
if ( plugin != null && plugin.hasCommand( COMMAND.EDIT ) ) {
// load the editor for this plugin
String editUrl =
getPath()
+ "api/repos/" + pathToId( file.getPath() ) + "/" + ( plugin != null && ( plugin.getCommandPerspective( COMMAND.EDIT ) != null ) ? plugin.getCommandPerspective( COMMAND.EDIT ) : "editor" ); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
// See if it's already loaded
for ( int i = 0; i < contentTabPanel.getTabCount(); i++ ) {
Widget w = contentTabPanel.getTab( i ).getContent();
if ( w instanceof IFrameTabPanel && ( (IFrameTabPanel) w ).getUrl().endsWith( editUrl ) ) {
// Already up, select and exit