mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-31 21:05:37 +02:00
new make target provider/make target/listener/event
This commit is contained in:
parent
4471c53d81
commit
2bb372a867
13 changed files with 200 additions and 26 deletions
|
@ -1,6 +1,5 @@
|
|||
package org.eclipse.cdt.make.core;
|
||||
/**********************************************************************
|
||||
* Copyright (c) 2002,2003 Rational Software Corporation and others.
|
||||
* Copyright (c) 2002,2003 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
|
||||
|
@ -8,8 +7,8 @@ package org.eclipse.cdt.make.core;
|
|||
*
|
||||
* Contributors:
|
||||
* QNX Software Systems - Initial API and implementation
|
||||
* IBM Rational Software - Initial API and implementation
|
||||
***********************************************************************/
|
||||
package org.eclipse.cdt.make.core;
|
||||
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.IPath;
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
/**********************************************************************
|
||||
* Copyright (c) 2002,2003 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.make.core;
|
||||
|
||||
import org.eclipse.core.resources.IContainer;
|
||||
import org.eclipse.core.runtime.IPath;
|
||||
|
||||
public interface IMakeTarget {
|
||||
IMakeTargetProvider getProvider();
|
||||
String getName();
|
||||
IContainer getContainer();
|
||||
boolean isStopOnError();
|
||||
boolean isDefaultBuildCmd();
|
||||
IPath getBuildCommand();
|
||||
String getBuildArguments();
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
/**********************************************************************
|
||||
* Copyright (c) 2002,2003 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.make.core;
|
||||
|
||||
public interface IMakeTargetListener {
|
||||
|
||||
void targetChanged(MakeTargetEvent event);
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
/**********************************************************************
|
||||
* Copyright (c) 2002,2003 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.make.core;
|
||||
|
||||
import org.eclipse.core.resources.IContainer;
|
||||
|
||||
public interface IMakeTargetProvider {
|
||||
|
||||
IMakeTarget[] getTargets();
|
||||
IMakeTarget[] getTargets(IContainer container);
|
||||
|
||||
IMakeBuilderInfo getBuilderInfo(IMakeTarget target);
|
||||
|
||||
void addListener(IMakeTargetListener listener);
|
||||
void removeListener(IMakeTargetListener listener);
|
||||
}
|
|
@ -1,6 +1,5 @@
|
|||
package org.eclipse.cdt.make.core;
|
||||
/**********************************************************************
|
||||
* Copyright (c) 2002,2003 Rational Software Corporation and others.
|
||||
* Copyright (c) 2002,2003 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
|
||||
|
@ -8,8 +7,8 @@ package org.eclipse.cdt.make.core;
|
|||
*
|
||||
* Contributors:
|
||||
* QNX Software Systems - Initial API and implementation
|
||||
* IBM Rational Software - Initial API and implementation
|
||||
***********************************************************************/
|
||||
package org.eclipse.cdt.make.core;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package org.eclipse.cdt.make.core;
|
||||
/**********************************************************************
|
||||
* Copyright (c) 2002,2003 Rational Software Corporation and others.
|
||||
* Copyright (c) 2002,2003 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
|
||||
|
@ -8,8 +7,8 @@ package org.eclipse.cdt.make.core;
|
|||
*
|
||||
* Contributors:
|
||||
* QNX Software Systems - Initial API and implementation
|
||||
* IBM Rational Software - Initial API and implementation
|
||||
***********************************************************************/
|
||||
package org.eclipse.cdt.make.core;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
import java.util.Map;
|
||||
|
@ -18,6 +17,7 @@ import java.util.ResourceBundle;
|
|||
|
||||
import org.eclipse.cdt.core.CCorePlugin;
|
||||
import org.eclipse.cdt.make.internal.core.BuildInfoFactory;
|
||||
import org.eclipse.cdt.make.internal.core.MakeTargetProvider;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.IPluginDescriptor;
|
||||
|
@ -29,6 +29,7 @@ import org.eclipse.core.runtime.Preferences;
|
|||
* The main plugin class to be used in the desktop.
|
||||
*/
|
||||
public class MakeCorePlugin extends Plugin {
|
||||
private IMakeTargetProvider fTargetProvider;
|
||||
public static final String OLD_BUILDER_ID = "org.eclipse.cdt.core.cbuilder"; //$NON-NLS-1$
|
||||
//The shared instance.
|
||||
private static MakeCorePlugin plugin;
|
||||
|
@ -118,4 +119,11 @@ public class MakeCorePlugin extends Plugin {
|
|||
public static IMakeBuilderInfo create(Map args, String builderID) {
|
||||
return BuildInfoFactory.create(args, builderID);
|
||||
}
|
||||
|
||||
public IMakeTargetProvider getTargetProvider() {
|
||||
if ( fTargetProvider == null) {
|
||||
fTargetProvider = new MakeTargetProvider();
|
||||
}
|
||||
return fTargetProvider;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package org.eclipse.cdt.make.core;
|
||||
/**********************************************************************
|
||||
* Copyright (c) 2002,2003 Rational Software Corporation and others.
|
||||
* Copyright (c) 2002,2003 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
|
||||
|
@ -8,8 +7,8 @@ package org.eclipse.cdt.make.core;
|
|||
*
|
||||
* Contributors:
|
||||
* QNX Software Systems - Initial API and implementation
|
||||
* IBM Rational Software - Initial API and implementation
|
||||
***********************************************************************/
|
||||
package org.eclipse.cdt.make.core;
|
||||
|
||||
import org.eclipse.core.resources.ICommand;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
|
|
|
@ -1,9 +1,13 @@
|
|||
/*
|
||||
* Created on Aug 14, 2003
|
||||
*
|
||||
* To change the template for this generated file go to
|
||||
* Window>Preferences>Java>Code Generation>Code and Comments
|
||||
*/
|
||||
/**********************************************************************
|
||||
* Copyright (c) 2002,2003 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.make.core;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package org.eclipse.cdt.make.core;
|
||||
/**********************************************************************
|
||||
* Copyright (c) 2002,2003 Rational Software Corporation and others.
|
||||
* Copyright (c) 2002,2003 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
|
||||
|
@ -8,8 +7,8 @@ package org.eclipse.cdt.make.core;
|
|||
*
|
||||
* Contributors:
|
||||
* QNX Software Systems - Initial API and implementation
|
||||
* IBM Rational Software - Initial API and implementation
|
||||
***********************************************************************/
|
||||
package org.eclipse.cdt.make.core;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
/**********************************************************************
|
||||
* Copyright (c) 2002,2003 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.make.core;
|
||||
|
||||
import java.util.EventObject;
|
||||
|
||||
public class MakeTargetEvent extends EventObject {
|
||||
public final int TARGET_ADD = 1;
|
||||
public final int TARGET_CHANGED = 2;
|
||||
public final int TARGET_REMOVED = 3;
|
||||
|
||||
IMakeTarget target;
|
||||
int type;
|
||||
|
||||
/**
|
||||
* @param source
|
||||
*/
|
||||
public MakeTargetEvent(Object source, int type, IMakeTarget target) {
|
||||
super(source);
|
||||
this.type = type;
|
||||
this.target = target;
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public IMakeTarget getTarget() {
|
||||
return target;
|
||||
}
|
||||
}
|
|
@ -1,6 +1,5 @@
|
|||
package org.eclipse.cdt.make.internal.core;
|
||||
/**********************************************************************
|
||||
* Copyright (c) 2002,2003 Rational Software Corporation and others.
|
||||
* Copyright (c) 2002,2003 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
|
||||
|
@ -8,8 +7,8 @@ package org.eclipse.cdt.make.internal.core;
|
|||
*
|
||||
* Contributors:
|
||||
* QNX Software Systems - Initial API and implementation
|
||||
* IBM Rational Software - Initial API and implementation
|
||||
***********************************************************************/
|
||||
package org.eclipse.cdt.make.internal.core;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package org.eclipse.cdt.make.internal.core;
|
||||
/**********************************************************************
|
||||
* Copyright (c) 2002,2003 Rational Software Corporation and others.
|
||||
* Copyright (c) 2002,2003 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
|
||||
|
@ -9,6 +8,7 @@ package org.eclipse.cdt.make.internal.core;
|
|||
* Contributors:
|
||||
* QNX Software Systems - Initial API and implementation
|
||||
***********************************************************************/
|
||||
package org.eclipse.cdt.make.internal.core;
|
||||
|
||||
import org.eclipse.cdt.core.CCorePlugin;
|
||||
import org.eclipse.cdt.core.ICDescriptor;
|
||||
|
|
|
@ -0,0 +1,64 @@
|
|||
/**********************************************************************
|
||||
* Copyright (c) 2002,2003 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.make.internal.core;
|
||||
|
||||
import org.eclipse.cdt.make.core.IMakeBuilderInfo;
|
||||
import org.eclipse.cdt.make.core.IMakeTarget;
|
||||
import org.eclipse.cdt.make.core.IMakeTargetListener;
|
||||
import org.eclipse.cdt.make.core.IMakeTargetProvider;
|
||||
import org.eclipse.core.resources.IContainer;
|
||||
|
||||
public class MakeTargetProvider implements IMakeTargetProvider {
|
||||
|
||||
public MakeTargetProvider() {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.make.core.IMakeTargetProvider#getTargets()
|
||||
*/
|
||||
public IMakeTarget[] getTargets() {
|
||||
// dinglis-TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.make.core.IMakeTargetProvider#getTargets(org.eclipse.core.resources.IContainer)
|
||||
*/
|
||||
public IMakeTarget[] getTargets(IContainer container) {
|
||||
// dinglis-TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.make.core.IMakeTargetProvider#getBuilderInfo(org.eclipse.cdt.make.core.IMakeTarget)
|
||||
*/
|
||||
public IMakeBuilderInfo getBuilderInfo(IMakeTarget target) {
|
||||
// dinglis-TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.make.core.IMakeTargetProvider#addListener(org.eclipse.cdt.make.core.IMakeTargetListener)
|
||||
*/
|
||||
public void addListener(IMakeTargetListener listener) {
|
||||
// dinglis-TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.make.core.IMakeTargetProvider#removeListener(org.eclipse.cdt.make.core.IMakeTargetListener)
|
||||
*/
|
||||
public void removeListener(IMakeTargetListener listener) {
|
||||
// dinglis-TODO Auto-generated method stub
|
||||
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Reference in a new issue