1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-03 14:25:37 +02:00

autotools: Make automake editor use make.[core|ui] interfaces.

Duplicating this interfaces just creates confusion due to interfaces in
autotools were copied from make bundles but staled in the years.
Implementation is kept as it is but at least the door is open for some
interoperability. 

Change-Id: I1eb4a7c7dc7511aa6cb15ec0716d0bae8a64389c
Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
This commit is contained in:
Alexander Kurtakov 2015-12-04 11:45:30 +02:00
parent 422b68793d
commit 48f520d54c
98 changed files with 187 additions and 1263 deletions

View file

@ -15,6 +15,14 @@ import java.net.URI;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.cdt.make.core.makefile.IDirective;
import org.eclipse.cdt.make.core.makefile.IInferenceRule;
import org.eclipse.cdt.make.core.makefile.IMacroDefinition;
import org.eclipse.cdt.make.core.makefile.IMakefile;
import org.eclipse.cdt.make.core.makefile.IMakefileReaderProvider;
import org.eclipse.cdt.make.core.makefile.IRule;
import org.eclipse.cdt.make.core.makefile.ITargetRule;
/**
* Makefile : ( statement ) *
* statement : rule | macro_definition | comments | empty

View file

@ -18,6 +18,11 @@ import java.util.Arrays;
import java.util.Comparator;
import org.eclipse.cdt.internal.autotools.ui.MakeUIImages;
import org.eclipse.cdt.make.core.makefile.IDirective;
import org.eclipse.cdt.make.core.makefile.IMacroDefinition;
import org.eclipse.cdt.make.core.makefile.IMakefile;
import org.eclipse.cdt.make.core.makefile.IRule;
import org.eclipse.cdt.make.ui.IWorkingCopyManager;
import org.eclipse.jface.text.ITextViewer;
import org.eclipse.jface.text.TextPresentation;
import org.eclipse.jface.text.contentassist.CompletionProposal;

View file

@ -15,6 +15,7 @@ package org.eclipse.cdt.internal.autotools.ui.editors.automake;
import java.io.IOException;
import java.util.Iterator;
import org.eclipse.cdt.make.core.makefile.IMakefile;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jface.text.IDocument;
import org.eclipse.ui.IEditorInput;

View file

@ -15,6 +15,7 @@ package org.eclipse.cdt.internal.autotools.ui.editors.automake;
import org.eclipse.cdt.autotools.core.AutotoolsPlugin;
import org.eclipse.cdt.internal.autotools.ui.preferences.AutomakeEditorPreferencePage;
import org.eclipse.cdt.internal.autotools.ui.preferences.AutotoolsEditorPreferenceConstants;
import org.eclipse.cdt.make.core.makefile.IMakefile;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.text.source.ISourceViewer;

View file

@ -12,6 +12,7 @@ package org.eclipse.cdt.internal.autotools.ui.editors.automake;
import org.eclipse.cdt.autotools.core.AutotoolsPlugin;
import org.eclipse.cdt.internal.autotools.ui.preferences.ColorManager;
import org.eclipse.cdt.make.ui.IWorkingCopyManager;
import org.eclipse.jface.preference.PreferenceConverter;
import org.eclipse.swt.graphics.Color;

View file

@ -11,6 +11,9 @@
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
import org.eclipse.cdt.autotools.ui.AutotoolsUIPlugin;
import org.eclipse.cdt.make.core.makefile.IDirective;
import org.eclipse.cdt.make.core.makefile.IMakefile;
import org.eclipse.cdt.make.core.makefile.IParent;
import org.eclipse.core.runtime.AssertionFailedException;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.IDocument;

View file

@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
import org.eclipse.cdt.make.core.makefile.IDirective;
import org.eclipse.cdt.make.core.makefile.IMacroDefinition;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IInformationControlCreator;

View file

@ -14,6 +14,8 @@ package org.eclipse.cdt.internal.autotools.ui.editors.automake;
import java.io.IOException;
import org.eclipse.cdt.make.core.makefile.IDirective;
public class Automakefile extends GNUAutomakefile {
public Automakefile() {

View file

@ -16,6 +16,20 @@ import java.util.ArrayList;
import java.util.List;
import org.eclipse.cdt.internal.autotools.ui.MakeUIImages;
import org.eclipse.cdt.make.core.makefile.IBadDirective;
import org.eclipse.cdt.make.core.makefile.ICommand;
import org.eclipse.cdt.make.core.makefile.IComment;
import org.eclipse.cdt.make.core.makefile.IDirective;
import org.eclipse.cdt.make.core.makefile.IEmptyLine;
import org.eclipse.cdt.make.core.makefile.IInferenceRule;
import org.eclipse.cdt.make.core.makefile.IMacroDefinition;
import org.eclipse.cdt.make.core.makefile.IMakefile;
import org.eclipse.cdt.make.core.makefile.IParent;
import org.eclipse.cdt.make.core.makefile.IRule;
import org.eclipse.cdt.make.core.makefile.ITargetRule;
import org.eclipse.cdt.make.core.makefile.gnu.IInclude;
import org.eclipse.cdt.make.core.makefile.gnu.ITerminal;
import org.eclipse.cdt.make.ui.IWorkingCopyManager;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.jface.viewers.TreeViewer;

View file

@ -15,6 +15,8 @@ package org.eclipse.cdt.internal.autotools.ui.editors.automake;
import java.io.IOException;
import java.io.StringReader;
import org.eclipse.cdt.make.core.makefile.IMakefile;
import org.eclipse.cdt.make.ui.IWorkingCopyManager;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IRegion;
import org.eclipse.jface.text.reconciler.DirtyRegion;

View file

@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
import org.eclipse.cdt.make.core.makefile.IBadDirective;
public class BadDirective extends Directive implements IBadDirective {
String line;

View file

@ -13,6 +13,8 @@ package org.eclipse.cdt.internal.autotools.ui.editors.automake;
import java.io.File;
import java.io.IOException;
import org.eclipse.cdt.make.core.makefile.ICommand;
/**
* Makefile : ( statement ) *
* statement : command | ..

View file

@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
import org.eclipse.cdt.make.core.makefile.IComment;
public class Comment extends Directive implements IComment {
String comment;

View file

@ -11,6 +11,7 @@
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
import org.eclipse.cdt.make.core.makefile.gnu.IConditional;
public abstract class Conditional extends Parent implements IConditional {

View file

@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
import org.eclipse.cdt.make.core.makefile.IDefaultRule;
/**
* .DEFAULT
* If the makefile uses this special target, the application shall ensure that it is

View file

@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
import org.eclipse.cdt.make.core.makefile.gnu.IDeleteOnErrorRule;
/**
* .DELETE_ON_ERROR
* If `.DELETE_ON_ERROR' is mentioned as a target anywhere in the

View file

@ -10,6 +10,9 @@
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
import org.eclipse.cdt.make.core.makefile.IDirective;
import org.eclipse.cdt.make.core.makefile.IMakefile;
public abstract class Directive implements IDirective {
int endLine;

View file

@ -13,6 +13,8 @@ package org.eclipse.cdt.internal.autotools.ui.editors.automake;
import java.io.File;
import org.eclipse.cdt.make.core.makefile.ICommand;
public class Else extends Conditional implements IAutomakeConditional, ICommand {
private boolean isAutomake;

View file

@ -11,6 +11,8 @@
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
import org.eclipse.cdt.make.core.makefile.IEmptyLine;
public class EmptyLine extends Directive implements IEmptyLine {
final public static char NL = '\n';

View file

@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
import org.eclipse.cdt.make.core.makefile.gnu.IExportAllVariablesRule;
/**
* .EXPORT_ALL_VARIABLES
* Simply by being mentioned as a target, this tells `make' to export

View file

@ -27,6 +27,11 @@ import java.util.StringTokenizer;
import org.eclipse.cdt.autotools.ui.AutotoolsUIPlugin;
import org.eclipse.cdt.make.core.MakeCorePlugin;
import org.eclipse.cdt.make.core.makefile.IAutomaticVariable;
import org.eclipse.cdt.make.core.makefile.IBuiltinFunction;
import org.eclipse.cdt.make.core.makefile.IDirective;
import org.eclipse.cdt.make.core.makefile.IMakefile;
import org.eclipse.cdt.make.core.makefile.gnu.IGNUMakefile;
import org.eclipse.core.filesystem.EFS;
import org.eclipse.core.filesystem.IFileInfo;
import org.eclipse.core.filesystem.IFileStore;
@ -893,9 +898,6 @@ public class GNUAutomakefile extends AbstractMakefile implements IGNUMakefile {
return list.toArray(new IDirective[list.size()]);
}
/* (non-Javadoc)
* @see org.eclipse.cdt.internal.autotools.ui.editors.automake.AbstractMakefile#getBuiltins()
*/
@Override
public IDirective[] getBuiltins() {
if (builtins == null) {
@ -985,4 +987,14 @@ public class GNUAutomakefile extends AbstractMakefile implements IGNUMakefile {
}
}
@Override
public IBuiltinFunction[] getBuiltinFunctions() {
return new IBuiltinFunction[0];
}
@Override
public IAutomaticVariable[] getAutomaticVariables() {
return new IAutomaticVariable[0];
}
}

View file

@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
import org.eclipse.cdt.make.core.makefile.ICommand;
/**
*/
public class GNUTargetRule extends TargetRule {

View file

@ -11,6 +11,8 @@
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
import org.eclipse.cdt.make.core.makefile.gnu.IVariableDefinition;
/**
*/
public class GNUVariableDef extends MacroDefinition implements IVariableDefinition {

View file

@ -1,32 +0,0 @@
/*******************************************************************************
* Copyright (c) 2000, 2010 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* QNX Software Systems - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
/**
* IArchiveTarget
* Archive files, are files maintained by the program "ar".
* They contain objects, the members of the Archive.
* For example:
* foolib(hack.o) : hack.o
* ar cr foolib hack.o
* ArchiveTarget(member) -- foolib(hack.o);
*
* @noextend This class is not intended to be subclassed by clients.
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IArchiveTarget extends ITarget {
/**
* Returns the members the point by archive target.
* @return String
*/
String[] getMembers();
}

View file

@ -1,21 +0,0 @@
/*******************************************************************************
* Copyright (c) 2000, 2010 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* QNX Software Systems - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
/**
* Represent an error in the makefile syntax
*
* @noextend This class is not intended to be subclassed by clients.
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IBadDirective {
}

View file

@ -1,72 +0,0 @@
/*******************************************************************************
* Copyright (c) 2000, 2010 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* QNX Software Systems - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
import java.io.File;
import java.io.IOException;
/**
* ICommand
* Commands are associated with a rule and executed by
* the make program when building a target.
*
* @noextend This class is not intended to be subclassed by clients.
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface ICommand extends IDirective {
char HYPHEN = '-';
String HYPHEN_STRING = "-"; //$NON-NLS-1$
char AT = '@';
String AT_STRING = "@"; //$NON-NLS-1$
char PLUS = '+';
String PLUS_STRING = "+"; //$NON-NLS-1$
char TAB = '\t';
/**
* - If the command prefix contains a hyphen, or the -i option is
* present, or the special target .IGNORE has either the current
* target as a prerequisite or has no prerequisites, any error
* found while executing the command will be ignored.
*/
boolean shouldIgnoreError();
/**
* @ If the command prefix contains an at sign and the
* command-line -n option is not specified, or the -s option is
* present, or the special target .SILENT has either the current
* target as a prerequisite or has no prerequisites, the command
* will not be written to standard output before it is executed.
*/
boolean shouldBeSilent();
/**
* + If the command prefix contains a plus sign, this indicates a
* command line that will be executed even if -n, -q or -t is
* specified.
*/
boolean shouldExecute();
/**
* Executes the command in a separate process with the
* specified environment and working directory.
*
*/
Process execute(String shell, String[] envp, File dir) throws IOException;
}

View file

@ -1,25 +0,0 @@
/*******************************************************************************
* Copyright (c) 2000, 2010 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* QNX Software Systems - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
/**
* Comments start with '#' and until the end of the line.
*
* @noextend This class is not intended to be subclassed by clients.
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IComment extends IDirective {
char POUND = '#';
String POUND_STRING = "#"; //$NON-NLS-1$
}

View file

@ -1,35 +0,0 @@
/*******************************************************************************
* Copyright (c) 2000, 2010 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* QNX Software Systems - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
/**
* @noextend This class is not intended to be subclassed by clients.
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IConditional extends IDirective {
String getConditional();
String getArg1();
String getArg2();
boolean isIfdef();
boolean isIfndef();
boolean isIfeq();
boolean isIfneq();
boolean isElse();
}

View file

@ -1,23 +0,0 @@
/*******************************************************************************
* Copyright (c) 2000, 2010 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* QNX Software Systems - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
/**
* .DEFAULT
* If the makefile uses this special target, the application shall ensure that it is
* specified with commands, but without prerequisites.
* The commands shall be used by make if there are no other rules available to build a target.
*
* @noextend This class is not intended to be subclassed by clients.
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IDefaultRule extends ISpecialRule {
}

View file

@ -1,24 +0,0 @@
/*******************************************************************************
* Copyright (c) 2000, 2010 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* QNX Software Systems - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
/**
* .DELETE_ON_ERROR'
* If `.DELETE_ON_ERROR' is mentioned as a target anywhere in the
* makefile, then `make' will delete the target of a rule if it has
* changed and its commands exit with a nonzero exit status, just as
* it does when it receives a signal.
*
* @noextend This class is not intended to be subclassed by clients.
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IDeleteOnErrorRule extends ISpecialRule {
}

View file

@ -1,48 +0,0 @@
/*******************************************************************************
* Copyright (c) 2000, 2010 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* QNX Software Systems - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
/**
* A Makefile can contain rules, macro definitons and comments.
* They are call directives.
*
* @noextend This class is not intended to be subclassed by clients.
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IDirective {
/**
* @return the parent of this directive, null if none.
*/
IDirective getParent();
/**
* @return the starting line number of this directive.
* The numbering starts at 1 .i.e the first line is not 0
*/
int getStartLine();
/**
* @return the ending line number of this directive.
* The numbering starts at 1 .i.e the first line is not 0
*/
int getEndLine();
/**
* Returns the makefile where the directive was found.
*
* @return <code>IMakefile</code>
*/
IMakefile getMakefile();
@Override
String toString();
}

View file

@ -1,20 +0,0 @@
/*******************************************************************************
* Copyright (c) 2000, 2010 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* QNX Software Systems - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
/**
* IEmptyLine
*
* @noextend This class is not intended to be subclassed by clients.
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IEmptyLine extends IDirective {
}

View file

@ -1,22 +0,0 @@
/*******************************************************************************
* Copyright (c) 2000, 2010 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* QNX Software Systems - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
/**
* .EXPORT_ALL_VARIABLES
* Simply by being mentioned as a target, this tells `make' to export
* all variables to child processes by default.
*
* @noextend This class is not intended to be subclassed by clients.
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IExportAllVariablesRule extends ISpecialRule {
}

View file

@ -1,29 +0,0 @@
/*******************************************************************************
* Copyright (c) 2000, 2010 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* QNX Software Systems - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
/**
* @noextend This class is not intended to be subclassed by clients.
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IGNUMakefile extends IMakefile {
/**
* Set the search include directories for the
* "include" directive
*/
void setIncludeDirectories(String[] paths);
/**
* @return the include directories search paths.
*/
String[] getIncludeDirectories();
}

View file

@ -1,22 +0,0 @@
/*******************************************************************************
* Copyright (c) 2000, 2010 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* QNX Software Systems - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
/**
* .IGNORE
* Prerequisites of this special target are targets themselves; this shall cause errors
* from commands associated with them to be ignored in the same manner as specified by the -i option.
*
* @noextend This class is not intended to be subclassed by clients.
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IIgnoreRule extends ISpecialRule {
}

View file

@ -1,19 +0,0 @@
/*******************************************************************************
* Copyright (c) 2000, 2010 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* QNX Software Systems - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
/**
* @noextend This class is not intended to be subclassed by clients.
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IInclude extends IParent {
String[] getFilenames();
}

View file

@ -1,26 +0,0 @@
/*******************************************************************************
* Copyright (c) 2000, 2010 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* QNX Software Systems - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
/**
* IInferenceRules are formated as follows:
* target:
* <tab>command
* [<tab>command]
*
* The target is of the form .s2 or .s1.s2
* There are no prerequisites.
*
* @noextend This class is not intended to be subclassed by clients.
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IInferenceRule extends IRule {
}

View file

@ -1,22 +0,0 @@
/*******************************************************************************
* Copyright (c) 2000, 2010 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* QNX Software Systems - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
/**
* .INTERMEDIATE
* The targets which `.INTERMEDIATE' depends on are treated as intermediate files.
* `.INTERMEDIATE' with no prerequisites has no effect.
*
* @noextend This class is not intended to be subclassed by clients.
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IIntermediateRule extends ISpecialRule {
}

View file

@ -1,23 +0,0 @@
/*******************************************************************************
* Copyright (c) 2000, 2010 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* QNX Software Systems - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
/**
* .LOW_RESOLUTION_TIME
* If you specify prerequisites for `.LOW_RESOLUTION_TIME', `make'
* assumes that these files are created by commands that generate low
* resolution time stamps.
*
* @noextend This class is not intended to be subclassed by clients.
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface ILowResolutionTimeRule extends ISpecialRule {
}

View file

@ -1,57 +0,0 @@
/*******************************************************************************
* Copyright (c) 2000, 2010 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* QNX Software Systems - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
/**
* IMacroDefinitions are in the form:
* string1 = [string2]
*
* @noextend This class is not intended to be subclassed by clients.
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IMacroDefinition extends IDirective {
/**
* @return the name of the macro
*/
String getName();
/**
* @return the value of the macro
*/
StringBuffer getValue();
/**
* @return the macro is a built-in
*/
boolean isFromDefault();
/**
* @return the macro was found in a Makefile.
*
*/
boolean isFromMakefile();
/**
* @return the macro came from the environment.
*/
boolean isFromEnviroment();
/**
* The macro came from the make command option -e
*/
boolean isFromEnvironmentOverride();
/**
* @return the macro was pass from an option to make.
*/
boolean isFromCommand();
}

View file

@ -1,138 +0,0 @@
/*******************************************************************************
* Copyright (c) 2000, 2010 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* QNX Software Systems - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
import java.io.IOException;
import java.io.Reader;
import java.net.URI;
/**
* IMakefile:
*
* Makefile : ( directive ) *
* directive : rule | macro_definition | comments | empty
* rule : inference_rule | target_rule | special_rule
* inference_rule : target ':' [ ';' command ] <nl>
* [ ( command ) * ]
* target_rule : [ ( target ) + ] ':' [ ( prerequisite ) * ] [ ';' command ] <nl>
* [ ( command ) * ]
* macro_definition : string '=' ( string )*
* comments : ('#' ( string ) <nl>) *
* empty : <nl>
* command : <tab> prefix_command string <nl>
* target : string
* prefix_command : '-' | '@' | '+'
* internal_macro : "$<" | "$*" | "$@" | "$?" | "$%"
*
* @noextend This class is not intended to be subclassed by clients.
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IMakefile extends IParent {
/**
* ITargetRule | IInferenceRule | ISpecialRule
*/
IRule[] getRules();
/**
* @return the IRule for target.
*/
IRule[] getRules(String target);
/**
* @return IInferenceRule
*
*/
IInferenceRule[] getInferenceRules();
/**
* @return the IInferenceRules for target.
*/
IInferenceRule[] getInferenceRules(String target);
/**
* @return ITargetRule
*/
ITargetRule[] getTargetRules();
/**
* @return the ITargetRules for name.
*/
ITargetRule[] getTargetRules(String target);
/**
* @return the IMacroDefinitions.
*/
IMacroDefinition[] getMacroDefinitions();
/**
* @return the IMacroDefinitions for name.
*/
IMacroDefinition[] getMacroDefinitions(String name);
/**
* @return all the built-in directives.
*/
IDirective[] getBuiltins();
/**
* @return all the built-in MacroDefintions
*/
IMacroDefinition[] getBuiltinMacroDefinitions();
/**
* @return the built-in macro definition for name.
*/
IMacroDefinition[] getBuiltinMacroDefinitions(String name);
/**
* @return line after expanding any macros.
*/
String expandString(String line);
/**
* @return line after expanding any macros.
*
* @param line - line to expand
* @param recursive - if true recursively expand.
*/
String expandString(String line, boolean recursive);
/**
* @return the makefile Reader provider used to create this makefile or <code>null</code>
*/
IMakefileReaderProvider getMakefileReaderProvider();
/**
* Clear all statements and (re)parse the Makefile
*/
void parse(String filePath, Reader makefile) throws IOException;
/**
* Clear all statements and (re)parse the Makefile
*/
void parse(URI fileURI, Reader makefile) throws IOException;
/**
* Clear the all statements and (re)parse the Makefile
* using the given makefile Reader provider
*
* @param makefileReaderProvider provider, or <code>null</code> to use a FileReader
*/
void parse(URI fileURI, IMakefileReaderProvider makefileReaderProvider) throws IOException;
/**
* @return the <code>URI</code> of this makefile
*/
URI getFileURI();
}

View file

@ -12,6 +12,7 @@
*/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
import org.eclipse.cdt.make.core.makefile.IMakefile;
import org.eclipse.ui.texteditor.IDocumentProvider;
/**

View file

@ -1,34 +0,0 @@
/*******************************************************************************
* Copyright (c) 2008, 2010 Nokia and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Nokia (Ed Swartz) - initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
import java.io.IOException;
import java.io.Reader;
import java.net.URI;
/**
* Provide an abstraction to loading the contents of a makefile
* @author eswartz
*
* @noextend This class is not intended to be subclassed by clients.
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IMakefileReaderProvider {
/**
* Get a reader for the contents of the file at filename.
* @param fileURI the file to read. It's up to the implementation how to read
* it, but usually EFS.getFileStore(fileURI).getInputStream(...) is the best bet.
* @return Reader a reader for the contents of the existing file
* @throws IOException if the file cannot be found according to the implementation
*/
Reader getReader(URI fileURI) throws IOException;
}

View file

@ -1,31 +0,0 @@
/*******************************************************************************
* Copyright (c) 2000, 2010 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* QNX Software Systems - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
import org.eclipse.cdt.core.IMarkerGenerator;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.IProgressMonitor;
/**
* @author alain
*
* To change the template for this generated type comment go to
* Window&gt;Preferences&gt;Java&gt;Code Generation&gt;Code and Comments
*
* @noextend This class is not intended to be subclassed by clients.
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IMakefileValidator {
void setMarkerGenerator(IMarkerGenerator errorHandler);
void checkFile(IFile file, IProgressMonitor monitor);
}

View file

@ -1,25 +0,0 @@
/*******************************************************************************
* Copyright (c) 2000, 2010 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* QNX Software Systems - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
/**
* .NOTPARALLEL
* If `.NOTPARALLEL' is mentioned as a target, then this invocation of
* `make' will be run serially, even if the `-j' option is given.
* Any recursively invoked `make' command will still be run in
* parallel (unless its makefile contains this target). Any
* prerequisites on this target are ignored.
*
* @noextend This class is not intended to be subclassed by clients.
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface INotParallelRule extends ISpecialRule {
}

View file

@ -1,19 +0,0 @@
/*******************************************************************************
* Copyright (c) 2000, 2010 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* QNX Software Systems - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
/**
* @noextend This class is not intended to be subclassed by clients.
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IParent extends IDirective {
IDirective[] getDirectives();
}

View file

@ -1,23 +0,0 @@
/*******************************************************************************
* Copyright (c) 2000, 2010 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* QNX Software Systems - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
/**
* .PHONY
* The prerequisites of the special target `.PHONY' are considered to be phony targets.
* When it is time to consider such a target, `make' will run its commands unconditionally, regardless of
* whether a file with that name exists or what its last-modification time is.
*
* @noextend This class is not intended to be subclassed by clients.
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IPhonyRule extends ISpecialRule {
}

View file

@ -1,22 +0,0 @@
/*******************************************************************************
* Copyright (c) 2000, 2010 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* QNX Software Systems - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
/**
* .POSIX
* The application shall ensure that this special target is specified without
* prerequisites or commands.
*
* @noextend This class is not intended to be subclassed by clients.
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IPosixRule extends ISpecialRule {
}

View file

@ -1,22 +0,0 @@
/*******************************************************************************
* Copyright (c) 2000, 2010 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* QNX Software Systems - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
/**
* .PRECIOUS
* Prerequisites of this special target shall not be removed if make recieves an
* asynchronous events.
*
* @noextend This class is not intended to be subclassed by clients.
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IPreciousRule extends ISpecialRule {
}

View file

@ -1,33 +0,0 @@
/*******************************************************************************
* Copyright (c) 2000, 2010 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* QNX Software Systems - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
/**
* There are several kinds of rules: Inference rules, target rules
* Some make provides special rules for example:
* .DEFAULT, .IGNORE etc ...
*
* @noextend This class is not intended to be subclassed by clients.
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IRule extends IParent {
/**
* @return Array of command for the rule.
*/
ICommand[] getCommands();
/**
* @return The rule target name.
*
*/
ITarget getTarget();
}

View file

@ -1,23 +0,0 @@
/*******************************************************************************
* Copyright (c) 2000, 2010 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* QNX Software Systems - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
/**
* .SCCS_GET
* The application shall ensure that this special target is specified without prerequesites.
* The commands specified with this target shall replace the default
* commands associated with this special target.
*
* @noextend This class is not intended to be subclassed by clients.
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface ISccsGetRule extends ISpecialRule {
}

View file

@ -1,25 +0,0 @@
/*******************************************************************************
* Copyright (c) 2000, 2010 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* QNX Software Systems - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
/**
* .SECONDARY
* The targets which `.SECONDARY' depends on are treated as
* intermediate files, except that they are never automatically deleted.
*
* `.SECONDARY' with no prerequisites causes all targets to be treated
* as secondary (i.e., no target is removed because it is considered intermediate).
*
* @noextend This class is not intended to be subclassed by clients.
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface ISecondaryRule extends ISpecialRule {
}

View file

@ -1,23 +0,0 @@
/*******************************************************************************
* Copyright (c) 2000, 2010 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* QNX Software Systems - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
/**
* .SILENT
* Prerequisites of this special target are targets themselves; this shall case
* commands associated with them not to be written to the standard output before
* they are executed.
*
* @noextend This class is not intended to be subclassed by clients.
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface ISilentRule extends ISpecialRule {
}

View file

@ -1,26 +0,0 @@
/*******************************************************************************
* Copyright (c) 2000, 2010 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* QNX Software Systems - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
/**
* Target rule that have special meaning for Make.
*
* @noextend This class is not intended to be subclassed by clients.
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface ISpecialRule extends IRule {
/**
* The meaning of the prerequistes are specific to
* each rules.
*/
String[] getPrerequisites();
}

View file

@ -1,22 +0,0 @@
/*******************************************************************************
* Copyright (c) 2000, 2010 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* QNX Software Systems - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
/**
* .SUFFIXES
* Prerequesites of .SUFFIXES shall be appended to the list of known suffixes and are
* used in conjunction with the inference rules.
*
* @noextend This class is not intended to be subclassed by clients.
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface ISuffixesRule extends ISpecialRule {
}

View file

@ -1,22 +0,0 @@
/*******************************************************************************
* Copyright (c) 2000, 2010 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* QNX Software Systems - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
/**
* @noextend This class is not intended to be subclassed by clients.
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface ITarget {
@Override
String toString();
}

View file

@ -1,20 +0,0 @@
/*******************************************************************************
* Copyright (c) 2000, 2010 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* QNX Software Systems - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
/**
* @noextend This class is not intended to be subclassed by clients.
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface ITargetRule extends IRule {
String[] getPrerequisites();
}

View file

@ -1,25 +0,0 @@
/*******************************************************************************
* Copyright (c) 2000, 2010 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* QNX Software Systems - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
/**
* ITerminal finish a block.
*
* @noextend This class is not intended to be subclassed by clients.
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface ITerminal extends IDirective {
boolean isEndef();
boolean isEndif();
}

View file

@ -1,21 +0,0 @@
/*******************************************************************************
* Copyright (c) 2000, 2010 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* QNX Software Systems - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
/**
* @noextend This class is not intended to be subclassed by clients.
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IUnExport extends IDirective {
String getVariable();
}

View file

@ -1,22 +0,0 @@
/*******************************************************************************
* Copyright (c) 2000, 2010 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* QNX Software Systems - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
/**
* @noextend This class is not intended to be subclassed by clients.
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IVPath extends IDirective {
String[] getDirectories();
String getPattern();
}

View file

@ -1,45 +0,0 @@
/*******************************************************************************
* Copyright (c) 2000, 2010 QNX Software Systems and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* QNX Software Systems - Initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
/**
*/
/**
* @noextend This class is not intended to be subclassed by clients.
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IVariableDefinition extends IMacroDefinition {
boolean isRecursivelyExpanded();
boolean isSimplyExpanded();
boolean isConditional();
boolean isAppend();
boolean isTargetSpecific();
boolean isExport();
boolean isMultiLine();
/**
* Variable from an `override' directive.
*/
boolean isOverride();
/**
* Automatic variable -- cannot be set.
*/
boolean isAutomatic();
String getTarget();
}

View file

@ -1,75 +0,0 @@
/*******************************************************************************
* Copyright (c) 2000, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.ui.IEditorInput;
/**
* Interface for accessing working copies of <code>IMakefile</code>
* objects. The original unit is only given indirectly by means
* of an <code>IEditorInput</code>. The life cycle is as follows:
* <ul>
* <li> <code>connect</code> creates and remembers a working copy of the
* unit which is encoded in the given editor input</li>
* <li> <code>getWorkingCopy</code> returns the working copy remembered on
* <code>connect</code></li>
* <li> <code>disconnect</code> destroys the working copy remembered on
* <code>connect</code></li>
* </ul>
* <p>
* This interface is not intended to be implemented by clients.
* </p>
*
* @noextend This class is not intended to be subclassed by clients.
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IWorkingCopyManager {
/**
* Connects the given editor input to this manager. After calling
* this method, a working copy will be available for the compilation unit encoded
* in the given editor input (does nothing if there is no encoded compilation unit).
*
* @param input the editor input
* @exception CoreException if the working copy cannot be created for the
* unit
*/
void connect(IEditorInput input) throws CoreException;
/**
* Disconnects the given editor input from this manager. After calling
* this method, a working copy for the compilation unit encoded
* in the given editor input will no longer be available. Does nothing if there
* is no encoded compilation unit, or if there is no remembered working copy for
* the compilation unit.
*
* @param input the editor input
*/
void disconnect(IEditorInput input);
/**
* Returns the working copy remembered for the compilation unit encoded in the
* given editor input.
*
* @param input the editor input
* @return the working copy of the compilation unit, or <code>null</code> if the
* input does not encode an editor input, or if there is no remembered working
* copy for this compilation unit
*/
IMakefile getWorkingCopy(IEditorInput input);
/**
* Shuts down this working copy manager. All working copies still remembered
* by this manager are destroyed.
*/
void shutdown();
}

View file

@ -1,44 +0,0 @@
/*******************************************************************************
* Copyright (c) 2000, 2010 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
import org.eclipse.ui.IEditorInput;
/**
* Extension interface for <code>IWorkingCopyManager</code>.
* @since 2.1
*
* @noextend This class is not intended to be subclassed by clients.
* @noimplement This interface is not intended to be implemented by clients.
*/
public interface IWorkingCopyManagerExtension {
/**
* Sets the given working copy for the given editor input. If the given editor input
* is not connected to this working copy manager, this call has no effect. <p>
* This working copy manager does not assume the ownership of this working copy, i.e.,
* the given working copy is not automatically be freed when this manager is shut down.
*
* @param input the editor input
* @param workingCopy the working copy
*/
void setWorkingCopy(IEditorInput input, IMakefile workingCopy);
/**
* Removes the working copy set for the given editor input. If there is no
* working copy set for this input or this input is not connected to this
* working copy manager, this call has no effect.
*
* @param input the editor input
*/
void removeWorkingCopy(IEditorInput input);
}

View file

@ -13,6 +13,8 @@ package org.eclipse.cdt.internal.autotools.ui.editors.automake;
import java.io.File;
import org.eclipse.cdt.make.core.makefile.ICommand;
public class If extends Conditional implements IAutomakeConditional, ICommand {
private static final String EMPTY = ""; //$NON-NLS-1$
private Rule rules[] = null;

View file

@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
import org.eclipse.cdt.make.core.makefile.IIgnoreRule;
/**
* .IGNORE
* Prerequisites of this special target are targets themselves; this shall cause errors

View file

@ -12,6 +12,9 @@ package org.eclipse.cdt.internal.autotools.ui.editors.automake;
import java.io.IOException;
import org.eclipse.cdt.make.core.makefile.IDirective;
import org.eclipse.cdt.make.core.makefile.gnu.IInclude;
public class Include extends Parent implements IInclude {
String[] filenames;

View file

@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
import org.eclipse.cdt.make.core.makefile.ICommand;
public class InferenceRule extends Rule {
public InferenceRule(Directive parent, Target target) {

View file

@ -10,6 +10,7 @@
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
import org.eclipse.cdt.make.core.makefile.gnu.IIntermediateRule;
/**
* .INTERMEDIATE

View file

@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
import org.eclipse.cdt.make.core.makefile.gnu.ILowResolutionTimeRule;
/**
* .LOW_RESOLUTION_TIME'
* If you specify prerequisites for `.LOW_RESOLUTION_TIME', `make'

View file

@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
import org.eclipse.cdt.make.core.makefile.IMacroDefinition;
/**
*/
public class MacroDefinition extends Directive implements IMacroDefinition {

View file

@ -16,6 +16,11 @@ import java.util.Arrays;
import java.util.Comparator;
import org.eclipse.cdt.internal.autotools.ui.MakeUIImages;
import org.eclipse.cdt.make.core.makefile.IDirective;
import org.eclipse.cdt.make.core.makefile.IMacroDefinition;
import org.eclipse.cdt.make.core.makefile.IMakefile;
import org.eclipse.cdt.make.core.makefile.IRule;
import org.eclipse.cdt.make.ui.IWorkingCopyManager;
import org.eclipse.jface.text.ITextViewer;
import org.eclipse.jface.text.TextPresentation;
import org.eclipse.jface.text.contentassist.CompletionProposal;

View file

@ -16,6 +16,20 @@ import java.util.List;
import org.eclipse.cdt.autotools.ui.AutotoolsUIPlugin;
import org.eclipse.cdt.internal.autotools.ui.MakeUIImages;
import org.eclipse.cdt.make.core.makefile.IBadDirective;
import org.eclipse.cdt.make.core.makefile.ICommand;
import org.eclipse.cdt.make.core.makefile.IComment;
import org.eclipse.cdt.make.core.makefile.IDirective;
import org.eclipse.cdt.make.core.makefile.IEmptyLine;
import org.eclipse.cdt.make.core.makefile.IInferenceRule;
import org.eclipse.cdt.make.core.makefile.IMacroDefinition;
import org.eclipse.cdt.make.core.makefile.IMakefile;
import org.eclipse.cdt.make.core.makefile.IParent;
import org.eclipse.cdt.make.core.makefile.IRule;
import org.eclipse.cdt.make.core.makefile.ITargetRule;
import org.eclipse.cdt.make.core.makefile.gnu.IInclude;
import org.eclipse.cdt.make.core.makefile.gnu.ITerminal;
import org.eclipse.cdt.make.ui.IWorkingCopyManager;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.action.MenuManager;

View file

@ -13,6 +13,7 @@ package org.eclipse.cdt.internal.autotools.ui.editors.automake;
import java.util.Iterator;
import org.eclipse.cdt.make.core.makefile.IMakefile;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;

View file

@ -17,6 +17,7 @@ import java.util.ResourceBundle;
import org.eclipse.cdt.autotools.core.AutotoolsPlugin;
import org.eclipse.cdt.autotools.ui.AutotoolsUIPlugin;
import org.eclipse.cdt.internal.autotools.ui.MakeUIMessages;
import org.eclipse.cdt.make.core.makefile.IDirective;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.ListenerList;
import org.eclipse.jface.action.IAction;

View file

@ -15,6 +15,8 @@ package org.eclipse.cdt.internal.autotools.ui.editors.automake;
import java.io.IOException;
import java.io.StringReader;
import org.eclipse.cdt.make.core.makefile.IMakefile;
import org.eclipse.cdt.make.ui.IWorkingCopyManager;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IRegion;
import org.eclipse.jface.text.reconciler.DirtyRegion;

View file

@ -12,6 +12,9 @@
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
import org.eclipse.cdt.make.core.makefile.IMacroDefinition;
import org.eclipse.cdt.make.core.makefile.IMakefile;
import org.eclipse.cdt.make.ui.IWorkingCopyManager;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.IRegion;
import org.eclipse.jface.text.ITextHover;

View file

@ -10,6 +10,7 @@
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
import org.eclipse.cdt.make.core.makefile.gnu.INotParallelRule;
/**
* .NOTPARALLEL

View file

@ -13,6 +13,10 @@ package org.eclipse.cdt.internal.autotools.ui.editors.automake;
import java.io.Reader;
import java.net.URI;
import org.eclipse.cdt.make.core.makefile.IAutomaticVariable;
import org.eclipse.cdt.make.core.makefile.IBuiltinFunction;
import org.eclipse.cdt.make.core.makefile.IDirective;
/**
* Makefile : ( statement ) *
* statement : rule | macro_definition | comments | empty
@ -65,4 +69,14 @@ public class NullMakefile extends AbstractMakefile {
protected void parse(URI fileURI, MakefileReader reader) {
}
@Override
public IBuiltinFunction[] getBuiltinFunctions() {
return new IBuiltinFunction[0];
}
@Override
public IAutomaticVariable[] getAutomaticVariables() {
return new IAutomaticVariable[0];
}
}

View file

@ -16,6 +16,9 @@ import java.net.URI;
import org.eclipse.cdt.autotools.ui.AutotoolsUIPlugin;
import org.eclipse.cdt.core.resources.FileStorage;
import org.eclipse.cdt.internal.autotools.ui.MakeUIMessages;
import org.eclipse.cdt.make.core.makefile.IDirective;
import org.eclipse.cdt.make.core.makefile.IMakefile;
import org.eclipse.cdt.make.ui.IWorkingCopyManager;
import org.eclipse.core.filesystem.URIUtil;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IStorage;

View file

@ -13,6 +13,9 @@ package org.eclipse.cdt.internal.autotools.ui.editors.automake;
import java.util.ArrayList;
import java.util.Arrays;
import org.eclipse.cdt.make.core.makefile.IDirective;
import org.eclipse.cdt.make.core.makefile.IParent;
/**
* IParent
*/

View file

@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
import org.eclipse.cdt.make.core.makefile.gnu.IPhonyRule;
/**
* .PHONY
* The prerequisites of the special target `.PHONY' are considered to be phony targets.

View file

@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
import org.eclipse.cdt.make.core.makefile.IPosixRule;
/**
* .POSIX
* The appliation shall ensure that this special target is specified without

View file

@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
import org.eclipse.cdt.make.core.makefile.IPreciousRule;
/**
* .PRECIOUS
* Prerequisites of this special target shall not be removed if make recieves an

View file

@ -19,6 +19,12 @@ import java.util.List;
import java.util.Map;
import org.eclipse.cdt.autotools.core.AutotoolsPlugin;
import org.eclipse.cdt.make.core.makefile.IDirective;
import org.eclipse.cdt.make.core.makefile.IMacroDefinition;
import org.eclipse.cdt.make.core.makefile.IParent;
import org.eclipse.cdt.make.core.makefile.IRule;
import org.eclipse.cdt.make.core.makefile.gnu.IConditional;
import org.eclipse.cdt.make.ui.IWorkingCopyManager;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.IDocument;

View file

@ -12,6 +12,11 @@ package org.eclipse.cdt.internal.autotools.ui.editors.automake;
import java.util.ArrayList;
import org.eclipse.cdt.make.core.makefile.ICommand;
import org.eclipse.cdt.make.core.makefile.IDirective;
import org.eclipse.cdt.make.core.makefile.IRule;
import org.eclipse.cdt.make.core.makefile.ITarget;
public abstract class Rule extends Parent implements IRule {
Target target;

View file

@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
import org.eclipse.cdt.make.core.makefile.ISccsGetRule;
/**
* .SCCS_GET
* The application shall ensure that this special target is specified without

View file

@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
import org.eclipse.cdt.make.core.makefile.gnu.ISecondaryRule;
/**
* .SECONDARY
* The targets which `.SECONDARY' depends on are treated as

View file

@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
import org.eclipse.cdt.make.core.makefile.ISilentRule;
/**
* .SILENT
* Prerequisties of this special target are targets themselves; this shall cause

View file

@ -10,6 +10,9 @@
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
import org.eclipse.cdt.make.core.makefile.ICommand;
import org.eclipse.cdt.make.core.makefile.ISpecialRule;
/**
* Targets that have special meaning for Make.
*/

View file

@ -10,6 +10,9 @@
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
import org.eclipse.cdt.make.core.makefile.ICommand;
import org.eclipse.cdt.make.core.makefile.IInferenceRule;
/**
* Here is the syntax of a static pattern rule:
*

View file

@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
import org.eclipse.cdt.make.core.makefile.ISuffixesRule;
/**
* .SUFFIXES
* Prerequisites of .SUFFIXES shall be appended to the list of known suffixes and are

View file

@ -12,6 +12,8 @@ package org.eclipse.cdt.internal.autotools.ui.editors.automake;
import java.io.File;
import org.eclipse.cdt.make.core.makefile.ITarget;
public class Target implements ITarget {
String target;

View file

@ -10,6 +10,9 @@
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
import org.eclipse.cdt.make.core.makefile.ICommand;
import org.eclipse.cdt.make.core.makefile.ITargetRule;
/**
* Makefile : ( statement ) *
* statement : rule | macro_definition | comments | empty

View file

@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
import org.eclipse.cdt.make.core.makefile.gnu.ITerminal;
public abstract class Terminal extends Directive implements ITerminal {
public Terminal(Directive parent) {

View file

@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
import org.eclipse.cdt.make.core.makefile.gnu.IUnExport;
public class UnExport extends Directive implements IUnExport {
String variable;

View file

@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
import org.eclipse.cdt.make.core.makefile.gnu.IVPath;
public class VPath extends Directive implements IVPath {
String pattern;

View file

@ -10,6 +10,8 @@
*******************************************************************************/
package org.eclipse.cdt.internal.autotools.ui.editors.automake;
import org.eclipse.cdt.make.core.makefile.gnu.IVariableDefinition;
/**
*/
public class VariableDefinition extends MacroDefinition implements IVariableDefinition {

View file

@ -15,6 +15,9 @@ package org.eclipse.cdt.internal.autotools.ui.editors.automake;
import java.util.HashMap;
import java.util.Map;
import org.eclipse.cdt.make.core.makefile.IMakefile;
import org.eclipse.cdt.make.ui.IWorkingCopyManager;
import org.eclipse.cdt.make.ui.IWorkingCopyManagerExtension;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.ui.IEditorInput;