-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modified files for CDT 9.5.0 to use with Pro*C plugin for Eclipse
- Loading branch information
Showing
7 changed files
with
263 additions
and
319 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,82 +1,7 @@ | ||
# Pro-C-for-Eclipse: Pro*C plugin for Eclipse. | ||
|
||
This repository contains a complete Eclipse workspace to compile successfully the Pro*C plugin. | ||
I don't code in Java, but you can send pull requests to make this plugin better. | ||
## Branch for CDT 9.5.0 | ||
|
||
Original work by https://github.com/buntatsu/cdt-proc. The firsts commits are, indeed, the original repo. | ||
This repository branch contains the code used to develop the Pro*C plugin for Eclipse using CDT 9.5.0 | ||
|
||
## How to compile the plugin | ||
|
||
🔘 You will need a **computer** with **JDK** installed. I suggest a list I tested it and it works. You can simply ignore it and use the most recent **JDK**. I tested on Windows, but you can use a osX or the Linux flavor you want. | ||
|
||
🔘 Download from https://www.eclipse.org/downloads/packages/release the package you want. Ensure you choose the **Eclipse IDE for Eclipse Committers** version. | ||
|
||
🔘 Open your **Eclipse IDE for Eclipse Committers**, create an empty workspace and install the version of CDT you want to use. You must install, at least, the main features. Restart the program. | ||
|
||
🔘 Go here and select the branch which name contains the name of your CDT version. | ||
|
||
🔘 Download the branch. It contains a workspace inside the branch. | ||
|
||
🔘 Open your **Eclipse IDE for Eclipse Committers** and open the workspace. Wait until completes the building of the workspace. It probably doesn't have the auto build. | ||
|
||
🔘 Select in any project the export option -> Deployable plugins and fragments -> select all -> Directory -> Select the directory -> Click Finish. | ||
|
||
🔘 Wait until completion and now you have your plugin ready in the folder you provided! | ||
|
||
## How to use the compiled plugin | ||
|
||
🔘 Download from https://www.eclipse.org/downloads/packages/release the package you want and install it. You will need the **Eclipse IDE for C/C++ Developers** version | ||
|
||
🔘 When you finish the installation, go to the *plugins* folder and find a file starts like this: _org.eclipse.cdt.core_X.Y.Z.YYYYMMDDhhmm.jar_. X.Y.Z stands for the version. Annotate the date. | ||
|
||
🔘 Go here and download the release with that version, if I have it. | ||
|
||
🔘 If I don't have it, submit an issue. Submit the name of your _org.eclipse.cdt_X.Y.Z.YYYYMMDDhhmm.jar_ file, not the _org.eclipse.cdt.core_X.Y.Z.YYYYMMDDhhmm.jar_ one! | ||
|
||
🔘 Replace the _org.eclipse.cdt.core_X.Y.Z.YYYYMMDDhhmm.jar_ and copy the other ones. Backup first the _org.eclipse.cdt.core_X.Y.Z.YYYYMMDDhhmm.jar_ file if you don't feel confident. | ||
|
||
## How to upgrade the plugin with Eclipse CDT | ||
|
||
🔘 Update CDT to the release version you want. This step assumes you have the version **Eclipse IDE for C/C++ Developers** for your package. If you have been installed a previous Pro*C plugin for Eclipse in this version, restore the original _org.eclipse.cdt.core_X.Y.Z.YYYYMMDDhhmm.jar_. | ||
|
||
🔘 Search in your plugins folder the lastest _org.eclipse.cdt.core_X.Y.Z.YYYYMMDDhhmm.jar_. You will have, at least, 2 versions of the file _org.eclipse.cdt.core_X.Y.Z.YYYYMMDDhhmm.jar_. | ||
|
||
🔘 Search in the releases list the lastest CDT version you have and download it. | ||
|
||
🔘 Replace the _org.eclipse.cdt.core_X.Y.Z.YYYYMMDDhhmm.jar_ and copy the other ones. Backup first the _org.eclipse.cdt.core_X.Y.Z.YYYYMMDDhhmm.jar_ file if you don't feel confident. | ||
|
||
## Version List | ||
|
||
| Package | Compilated package numbers | | ||
|-----------|----------------------------------------| | ||
| CDT_9_6_0 | org.eclipse.cdt_9.6.0.201811241055.jar | | ||
| CDT_9_5_5 | org.eclipse.cdt_9.5.5.201811180605.jar | | ||
| CDT_9_5_4 | org.eclipse.cdt_9.5.4.201810050005.jar | | ||
| CDT_9_5_3 | org.eclipse.cdt_9.5.3.201809121146.jar | | ||
| CDT_9_5_2 | org.eclipse.cdt_9.5.2.201807181141.jar | | ||
| CDT_9_5_1 | org.eclipse.cdt_9.5.1.201807051742.jar | | ||
| CDT_9_5_0 | org.eclipse.cdt_9.5.0.201806170908.jar | | ||
| CDT_9_4_3 | org.eclipse.cdt_9.4.3.201802261533.jar | | ||
| CDT_9_4_2 | org.eclipse.cdt_9.4.2.201802122019.jar | | ||
| CDT_9_4_1 | org.eclipse.cdt_9.3.0.201801130900.jar | | ||
| CDT_9_4_0 | org.eclipse.cdt_9.3.0.201712020452.jar | | ||
|
||
## Warnings | ||
|
||
⬜️ Be careful about CDT_9_4_1 and CDT_9_4_0! They use the same names with different dates. That's why you can annotate the release date, it serves as reference number for me. | ||
|
||
## TODO | ||
|
||
✔️ Get the version numbers of each package and make the version list. | ||
|
||
✔️ Renaming the original plugin. | ||
|
||
❌️ Upload every version. | ||
|
||
❌️ Buglist of everyday use. | ||
|
||
❌️ Not modifying the original _org.eclipse.cdt.core_X.Y.Z.YYYYMMDDhhmm.jar_ to use this plugin. | ||
|
||
## JDK Used: | ||
|
||
All CDT versions uses JDK 1.8 to compile them, as you can see in the manifest.mf files in each version. | ||
For more info, see the master branch. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
219 changes: 219 additions & 0 deletions
219
...e.cdt.core/parser/org/eclipse/cdt/internal/core/parser/scanner/ASTInclusionStatement.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,219 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2007, 2015 Wind River Systems, Inc. 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: | ||
* Markus Schorn - initial API and implementation | ||
* Sergey Prigogin (Google) | ||
*******************************************************************************/ | ||
package org.eclipse.cdt.internal.core.parser.scanner; | ||
|
||
import org.eclipse.cdt.core.dom.ast.IASTName; | ||
import org.eclipse.cdt.core.dom.ast.IASTPreprocessorIncludeStatement; | ||
import org.eclipse.cdt.core.dom.ast.IASTTranslationUnit; | ||
import org.eclipse.cdt.core.dom.ast.IFileNomination; | ||
import org.eclipse.cdt.core.index.IIndexFile; | ||
import org.eclipse.cdt.core.parser.ISignificantMacros; | ||
import org.eclipse.cdt.internal.core.dom.parser.ASTNodeSpecification; | ||
import org.eclipse.core.runtime.CoreException; | ||
|
||
|
||
public class ASTInclusionStatement extends ASTPreprocessorNode implements IASTPreprocessorIncludeStatement { | ||
private static final ISignificantMacros[] NO_VERSIONS = {}; | ||
|
||
private final ASTPreprocessorName fName; | ||
private final String fPath; | ||
private final boolean fIsResolved; | ||
private final boolean fIsSystemInclude; | ||
private final boolean fFoundByHeuristics; | ||
private final boolean fIncludedFileExported; | ||
private final IFileNomination fNominationDelegate; | ||
private boolean fPragmaOnce; | ||
private boolean fCreatesAST; | ||
private ISignificantMacros fSignificantMacros; | ||
private ISignificantMacros[] fLoadedVersions = NO_VERSIONS; | ||
private long fIncludedFileContentsHash; | ||
private long fIncludedFileTimestamp = -1; | ||
private long fIncludedFileSize; | ||
private long fIncludedFileReadTime; | ||
private boolean fErrorInIncludedFile; | ||
|
||
public ASTInclusionStatement(IASTTranslationUnit parent, | ||
int startNumber, int nameStartNumber, int nameEndNumber, int endNumber, | ||
char[] headerName, String filePath, boolean userInclude, boolean active, boolean heuristic, | ||
boolean exportedFile, IFileNomination nominationDelegate) { | ||
super(parent, IASTTranslationUnit.PREPROCESSOR_STATEMENT, startNumber, endNumber); | ||
fName= new ASTPreprocessorName(this, IASTPreprocessorIncludeStatement.INCLUDE_NAME, | ||
nameStartNumber, nameEndNumber, headerName, null); | ||
fPath= filePath == null ? "" : filePath; //$NON-NLS-1$ | ||
fIsResolved= filePath != null; | ||
fIsSystemInclude= !userInclude; | ||
fFoundByHeuristics= heuristic; | ||
fSignificantMacros= ISignificantMacros.NONE; | ||
fNominationDelegate= nominationDelegate; | ||
fIncludedFileExported= exportedFile; | ||
if (!active) { | ||
setInactive(); | ||
} | ||
} | ||
|
||
@Override | ||
public IASTName getName() { | ||
return fName; | ||
} | ||
|
||
@Override | ||
public String getPath() { | ||
return fPath; | ||
} | ||
|
||
@Override | ||
public boolean isResolved() { | ||
return fIsResolved; | ||
} | ||
|
||
@Override | ||
public boolean isSystemInclude() { | ||
return fIsSystemInclude; | ||
} | ||
|
||
@Override | ||
void findNode(ASTNodeSpecification<?> nodeSpec) { | ||
super.findNode(nodeSpec); | ||
nodeSpec.visit(fName); | ||
} | ||
|
||
@Override | ||
public boolean isResolvedByHeuristics() { | ||
return fFoundByHeuristics; | ||
} | ||
|
||
@Override | ||
public boolean hasPragmaOnceSemantics() { | ||
if (fNominationDelegate != null) { | ||
try { | ||
return fNominationDelegate.hasPragmaOnceSemantics(); | ||
} catch (CoreException e) { | ||
} | ||
} | ||
return fPragmaOnce; | ||
} | ||
|
||
public void setPragamOnceSemantics(boolean value) { | ||
assert fNominationDelegate == null; | ||
fPragmaOnce= value; | ||
} | ||
|
||
@Override | ||
public ISignificantMacros getSignificantMacros() { | ||
if (fNominationDelegate != null) { | ||
try { | ||
return fNominationDelegate.getSignificantMacros(); | ||
} catch (CoreException e) { | ||
} | ||
} | ||
return fSignificantMacros; | ||
} | ||
|
||
public void setSignificantMacros(ISignificantMacros sig) { | ||
assert sig != null; | ||
assert fNominationDelegate == null; | ||
fSignificantMacros= sig; | ||
} | ||
|
||
public void setLoadedVersions(ISignificantMacros[] versions) { | ||
fLoadedVersions= versions; | ||
} | ||
|
||
@Override | ||
public ISignificantMacros[] getLoadedVersions() { | ||
return fLoadedVersions; | ||
} | ||
|
||
@Override | ||
public long getIncludedFileTimestamp() { | ||
if (fNominationDelegate != null) { | ||
return 0; | ||
} | ||
return fIncludedFileTimestamp; | ||
} | ||
|
||
public void setIncludedFileTimestamp(long timestamp) { | ||
assert fNominationDelegate == null; | ||
fIncludedFileTimestamp= timestamp; | ||
} | ||
|
||
@Override | ||
public long getIncludedFileReadTime() { | ||
if (fNominationDelegate != null) { | ||
return 0; | ||
} | ||
return fIncludedFileReadTime; | ||
} | ||
|
||
public void setIncludedFileReadTime(long time) { | ||
assert fNominationDelegate == null; | ||
fIncludedFileReadTime= time; | ||
} | ||
|
||
@Override | ||
public long getIncludedFileSize() { | ||
if (fNominationDelegate != null) { | ||
return 0; | ||
} | ||
return fIncludedFileSize; | ||
} | ||
|
||
public void setIncludedFileSize(long size) { | ||
assert fNominationDelegate == null; | ||
fIncludedFileSize= size; | ||
} | ||
|
||
@Override | ||
public long getIncludedFileContentsHash() { | ||
if (fNominationDelegate != null) { | ||
return 0; | ||
} | ||
return fIncludedFileContentsHash; | ||
} | ||
|
||
public void setIncludedFileContentsHash(long hash) { | ||
assert fNominationDelegate == null; | ||
fCreatesAST= true; | ||
fIncludedFileContentsHash= hash; | ||
} | ||
|
||
@Override | ||
public boolean isErrorInIncludedFile() { | ||
if (fNominationDelegate != null) { | ||
return false; | ||
} | ||
return fErrorInIncludedFile; | ||
} | ||
|
||
public void setErrorInIncludedFile(boolean error) { | ||
assert fNominationDelegate == null; | ||
fErrorInIncludedFile= error; | ||
} | ||
|
||
@Override | ||
public boolean isIncludedFileExported() { | ||
return fIncludedFileExported; | ||
} | ||
|
||
@Override | ||
public boolean createsAST() { | ||
return fCreatesAST; | ||
} | ||
|
||
@Override | ||
public IIndexFile getImportedIndexFile() { | ||
if (fNominationDelegate instanceof IIndexFile) | ||
return (IIndexFile) fNominationDelegate; | ||
|
||
return null; | ||
} | ||
} |
Oops, something went wrong.