mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Cosmetics.
This commit is contained in:
parent
a288931a1b
commit
563ed95979
1 changed files with 2 additions and 10 deletions
|
@ -9,7 +9,6 @@
|
||||||
* Anton Leherbauer (Wind River Systems) - initial API and implementation
|
* Anton Leherbauer (Wind River Systems) - initial API and implementation
|
||||||
* Markus Schorn (Wind River Systems)
|
* Markus Schorn (Wind River Systems)
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.cdt.internal.ui.editor;
|
package org.eclipse.cdt.internal.ui.editor;
|
||||||
|
|
||||||
import java.util.ResourceBundle;
|
import java.util.ResourceBundle;
|
||||||
|
@ -34,7 +33,6 @@ import org.eclipse.cdt.internal.ui.util.EditorUtility;
|
||||||
* @since 4.0
|
* @since 4.0
|
||||||
*/
|
*/
|
||||||
public class ToggleSourceAndHeaderAction extends TextEditorAction {
|
public class ToggleSourceAndHeaderAction extends TextEditorAction {
|
||||||
|
|
||||||
private static ITranslationUnit fgLastPartnerUnit;
|
private static ITranslationUnit fgLastPartnerUnit;
|
||||||
private static ITranslationUnit fgLastSourceUnit;
|
private static ITranslationUnit fgLastSourceUnit;
|
||||||
|
|
||||||
|
@ -50,9 +48,6 @@ public class ToggleSourceAndHeaderAction extends TextEditorAction {
|
||||||
super(bundle, prefix, editor);
|
super(bundle, prefix, editor);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* @see org.eclipse.jface.action.Action#run()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
IWorkingCopy currentUnit= getWorkingCopy();
|
IWorkingCopy currentUnit= getWorkingCopy();
|
||||||
|
@ -83,9 +78,6 @@ public class ToggleSourceAndHeaderAction extends TextEditorAction {
|
||||||
return manager.getWorkingCopy(input);
|
return manager.getWorkingCopy(input);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* @see org.eclipse.ui.texteditor.TextEditorAction#update()
|
|
||||||
*/
|
|
||||||
@Override
|
@Override
|
||||||
public void update() {
|
public void update() {
|
||||||
setEnabled(getWorkingCopy() != null);
|
setEnabled(getWorkingCopy() != null);
|
||||||
|
@ -98,7 +90,7 @@ public class ToggleSourceAndHeaderAction extends TextEditorAction {
|
||||||
* @return the partner translation unit
|
* @return the partner translation unit
|
||||||
*/
|
*/
|
||||||
private ITranslationUnit computePartnerFile(ITranslationUnit tUnit) {
|
private ITranslationUnit computePartnerFile(ITranslationUnit tUnit) {
|
||||||
// try shortcut for fast toggling
|
// Try shortcut for fast toggling.
|
||||||
if (fgLastPartnerUnit != null) {
|
if (fgLastPartnerUnit != null) {
|
||||||
final ITranslationUnit originalUnit;
|
final ITranslationUnit originalUnit;
|
||||||
if (tUnit instanceof IWorkingCopy) {
|
if (tUnit instanceof IWorkingCopy) {
|
||||||
|
@ -114,7 +106,7 @@ public class ToggleSourceAndHeaderAction extends TextEditorAction {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// search partner file based on filename/extension
|
// Search partner file based on filename/extension.
|
||||||
return SourceHeaderPartnerFinder.getPartnerTranslationUnit(tUnit);
|
return SourceHeaderPartnerFinder.getPartnerTranslationUnit(tUnit);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue