1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-06-07 09:46:02 +02:00

Bug 80175: Replace the CDT source lookup by the source lookup provided by Eclipse platform. Removed the old source lookup related classes and interfaces.

This commit is contained in:
Mikhail Khodjaiants 2005-05-09 21:41:40 +00:00
parent 72807c0c5f
commit ff1dee0158
6 changed files with 9 additions and 131 deletions

View file

@ -1,3 +1,12 @@
2005-05-09 Mikhail Khodjaiants
Bug 80175: Replace the CDT source lookup by the source lookup provided by Eclipse platform.
Removed the old source lookup related classes and interfaces.
* CoreFileLaunchConfigurationTabGroup.java
* LaunchMessages.properties
* LocalAttachLaunchConfigurationTabGroup.java
* LocalRunLaunchConfigurationTabGroup.java
- CSourceLookupTab.java
2005-04-21 Mikhail Khodjaiants
Bug 80175: Replace the CDT source lookup by the source lookup provided by Eclipse platform.
* CoreFileLaunchConfigurationTabGroup.java

View file

@ -29,7 +29,6 @@ public class CoreFileLaunchConfigurationTabGroup extends AbstractLaunchConfigura
ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[] {
new CMainTab(),
new CoreFileDebuggerTab(),
// new CSourceLookupTab(),
new SourceLookupTab(),
new CommonTab()
};

View file

@ -69,8 +69,6 @@ AbstractCDebuggerTab.ErrorLoadingDebuggerPage=Error Loading Debugger UI Componen
LaunchUIPlugin.Error=Error
CSourceLookupTab.Source=Source
CMainTab.Project_required=Project required
CMainTab.Enter_project_before_searching_for_program=Project must first be entered before searching for a program
CMainTab.Program_Selection=Program Selection

View file

@ -27,7 +27,6 @@ public class LocalAttachLaunchConfigurationTabGroup extends AbstractLaunchConfig
ILaunchConfigurationTab[] tabs = new ILaunchConfigurationTab[] {
new CMainTab(),
new CDebuggerTab(true),
// new CSourceLookupTab(),
new SourceLookupTab(),
new CommonTab()
};

View file

@ -30,7 +30,6 @@ public class LocalRunLaunchConfigurationTabGroup extends AbstractLaunchConfigura
new CArgumentsTab(),
new MigratingCEnvironmentTab(),
new CDebuggerTab(false),
// new CSourceLookupTab(),
new SourceLookupTab(),
new CommonTab()
};

View file

@ -1,126 +0,0 @@
/**********************************************************************
* Copyright (c) 2002 - 2004 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Common Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/cpl-v10.html
*
* Contributors:
* QNX Software Systems - Initial API and implementation
***********************************************************************/
package org.eclipse.cdt.launch.ui;
import org.eclipse.cdt.debug.core.ICDTLaunchConfigurationConstants;
import org.eclipse.cdt.debug.ui.CDebugUIPlugin;
import org.eclipse.cdt.debug.ui.sourcelookup.SourceLookupBlock;
import org.eclipse.cdt.launch.internal.ui.LaunchImages;
import org.eclipse.cdt.launch.internal.ui.LaunchMessages;
import org.eclipse.cdt.launch.internal.ui.LaunchUIPlugin;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.debug.core.ILaunchConfiguration;
import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
/**
* Enter type comment.
*
* @since: Feb 13, 2003
*/
public class CSourceLookupTab extends CLaunchConfigurationTab
{
private SourceLookupBlock fBlock = null;
/* (non-Javadoc)
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#createControl(org.eclipse.swt.widgets.Composite)
*/
public void createControl( Composite parent )
{
Composite control = new Composite( parent, SWT.NONE );
control.setLayout( new GridLayout() );
setControl( control );
LaunchUIPlugin.getDefault().getWorkbench().getHelpSystem().setHelp(getControl(), ICDTLaunchHelpContextIds.LAUNCH_CONFIGURATION_DIALOG_SOURCELOOKUP_TAB);
fBlock = new SourceLookupBlock();
fBlock.createControl( control );
fBlock.setLaunchConfigurationDialog( getLaunchConfigurationDialog() );
}
/* (non-Javadoc)
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#setDefaults(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
*/
public void setDefaults( ILaunchConfigurationWorkingCopy configuration )
{
configuration.setAttribute( ILaunchConfiguration.ATTR_SOURCE_LOCATOR_ID, CDebugUIPlugin.getDefaultSourceLocatorID() );
}
/* (non-Javadoc)
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#initializeFrom(org.eclipse.debug.core.ILaunchConfiguration)
*/
public void initializeFrom( ILaunchConfiguration configuration )
{
fBlock.initialize( configuration );
}
/* (non-Javadoc)
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#performApply(org.eclipse.debug.core.ILaunchConfigurationWorkingCopy)
*/
public void performApply( ILaunchConfigurationWorkingCopy configuration )
{
configuration.setAttribute( ILaunchConfiguration.ATTR_SOURCE_LOCATOR_ID, CDebugUIPlugin.getDefaultSourceLocatorID() );
IProject project = getProject( configuration );
if ( project != null )
fBlock.performApply( configuration );
}
/* (non-Javadoc)
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#getName()
*/
public String getName()
{
return LaunchMessages.getString("CSourceLookupTab.Source"); //$NON-NLS-1$
}
/* (non-Javadoc)
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#getImage()
*/
public Image getImage()
{
return LaunchImages.get( LaunchImages.IMG_VIEW_SOURCE_TAB );
}
private IProject getProject( ILaunchConfiguration configuration )
{
IProject project = null;
try
{
String projectName = configuration.getAttribute( ICDTLaunchConfigurationConstants.ATTR_PROJECT_NAME, "" ); //$NON-NLS-1$
if ( !isEmpty( projectName ) )
project = ResourcesPlugin.getWorkspace().getRoot().getProject( projectName );
}
catch( CoreException e )
{
}
return project;
}
private boolean isEmpty( String string )
{
return string == null || string.length() == 0;
}
/* (non-Javadoc)
* @see org.eclipse.debug.ui.ILaunchConfigurationTab#dispose()
*/
public void dispose()
{
if ( fBlock != null )
fBlock.dispose();
super.dispose();
}
}