Skip to content
Commits on Source (3)
Contributing to Eclipse Platform runtime project
================================================
Thanks for your interest in this project.
Project description:
--------------------
Platform runtime provides the background componentns for Eclipse based applications.
Website: <https://projects.eclipse.org/projects/eclipse.platform>
For more information, refer to the [Platform UI wiki page][1].
How to contribute:
--------------------
Contributions to Platform UI are most welcome. There are many ways to contribute,
from entering high quality bug reports, to contributing code or documentation changes.
For a complete guide, see the [Platform UI - How to contribute wiki page][2] page on the team wiki.
Test dependencies
-----------------
Several test plug-ins have a dependency to the Mockito and Hamcrest library.
Please install them from the [Orbit Download page][3]
Currently the following versions are required:
- org.hamcrest;bundle-version="1.3.0",
- org.mockito;bundle-version="2.13",
How to build on the command line
--------------------------------
You need Maven 3.3.1 installed. After this you can run the build via the following command:
mvn clean verify -Pbuild-individual-bundles
Developer resources:
--------------------
Information regarding source code management, builds, coding standards, and more.
- <https://projects.eclipse.org/projects/eclipse.platform/developer>
Contributor License Agreement:
------------------------------
Before your contribution can be accepted by the project, you need to create and electronically sign the Eclipse Foundation Contributor License Agreement (CLA).
- <http://www.eclipse.org/legal/CLA.php>
Search for bugs:
----------------
This project uses Bugzilla to track ongoing development and issues.
- <https://bugs.eclipse.org/bugs/buglist.cgi?bug_status=UNCONFIRMED&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED&classification=Eclipse&component=runtime&list_id=12049886&product=Platform&query_format=advanced>
Create a new bug:
-----------------
Be sure to search for existing bugs before you create another one. Remember that contributions are always welcome!
- <https://bugs.eclipse.org/bugs/enter_bug.cgi?product=platform;component=runtime>
Contact:
--------
Contact the project developers via the project's "dev" list.
- <https://accounts.eclipse.org/mailing-list/platform-dev>
License
-------
[Eclipse Public License (EPL) 2.0][4]
[1]: http://wiki.eclipse.org/Platform_UI
[2]: https://wiki.eclipse.org/Platform_UI/How_to_Contribute
[3]: http://download.eclipse.org/tools/orbit/downloads/
[4]: https://www.eclipse.org/legal/epl-2.0/
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<component id="org.eclipse.core.contenttype" version="2">
<resource path="src/org/eclipse/core/runtime/content/IContentType.java" type="org.eclipse.core.runtime.content.IContentType">
<filter comment="The Javadoc comment was replaced by proper API Tools tag" id="403853384">
<message_arguments>
<message_argument value="org.eclipse.core.runtime.content.IContentType"/>
</message_arguments>
</filter>
</resource>
<resource path="src/org/eclipse/core/runtime/content/IContentTypeManager.java" type="org.eclipse.core.runtime.content.IContentTypeManager">
<filter comment="https://bugs.eclipse.org/bugs/show_bug.cgi?id=57908#c37" id="403853384">
<message_arguments>
<message_argument value="org.eclipse.core.runtime.content.IContentTypeManager"/>
</message_arguments>
</filter>
</resource>
</component>
......@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.core.contenttype; singleton:=true
Bundle-Version: 3.7.200.qualifier
Bundle-Version: 3.7.300.qualifier
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Require-Bundle: org.eclipse.equinox.preferences;bundle-version="[3.2.0,4.0.0)",
......
......@@ -14,11 +14,11 @@
<parent>
<artifactId>eclipse.platform.runtime</artifactId>
<groupId>eclipse.platform.runtime</groupId>
<version>4.10.0-SNAPSHOT</version>
<version>4.11.0-SNAPSHOT</version>
<relativePath>../../</relativePath>
</parent>
<groupId>org.eclipse.core</groupId>
<artifactId>org.eclipse.core.contenttype</artifactId>
<version>3.7.200-SNAPSHOT</version>
<version>3.7.300-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
......@@ -45,8 +45,6 @@ public class Activator implements BundleActivator, ServiceTrackerCustomizer<IExt
public void start(BundleContext context) throws Exception {
bundleContext = context;
singleton = this;
// ContentTypeManager should be started first
ContentTypeManager.startup();
contentManagerService = bundleContext.registerService(IContentTypeManager.class, ContentTypeManager.getInstance(), new Hashtable<String, Object>());
registryTracker = new ServiceTracker<>(context, IExtensionRegistry.class, this);
registryTracker.open();
......
......@@ -40,7 +40,7 @@ public class ContentTypeManager extends ContentTypeMatcher implements IContentTy
private static IRegistryChangeListener runtimeExtensionListener = new ContentTypeRegistryChangeListener();
private static IRegistryChangeListener contentExtensionListener = new ContentTypeRegistryChangeListener();
private static ContentTypeManager instance;
private static volatile ContentTypeManager instance;
public static final int BLOCK_SIZE = 0x400;
public static final String CONTENT_TYPE_PREF_NODE = IContentConstants.RUNTIME_NAME + IPath.SEPARATOR + "content-types"; //$NON-NLS-1$
......@@ -57,14 +57,6 @@ public class ContentTypeManager extends ContentTypeMatcher implements IContentTy
*/
protected final ListenerList<IContentTypeChangeListener> contentTypeListeners = new ListenerList<>();
/**
* Creates and initializes the platform's content type manager. A reference to the
* content type manager can later be obtained by calling <code>getInstance()</code>.
*/
// TODO we can remove this sometime, it is no longer needed
public static void startup() {
getInstance();
}
public static void addRegistryChangeListener(IExtensionRegistry registry) {
if (registry == null)
......@@ -93,13 +85,20 @@ public class ContentTypeManager extends ContentTypeMatcher implements IContentTy
}
/**
* Obtains this platform's content type manager.
* Obtains this platform's content type manager. Lazyly creates and initializes
* the platform's content type manager.
*
*
* @return the content type manager
*/
public static ContentTypeManager getInstance() {
if (instance == null)
if (instance == null) {
synchronized (ContentTypeManager.class) {
if (instance == null) {
instance = new ContentTypeManager();
}
}
}
return instance;
}
......
......@@ -65,22 +65,22 @@ public interface IContentDescriber {
int VALID = 2;
/**
* Tries to fill a description for the given contents. Returns
* an <code>int</code> indicating whether the given stream of
* bytes represents a valid sample for its corresponding content type.
* If no content description is provided, this method should perform
* content type validation.
* Tries to fill a description for the given contents. Returns an
* <code>int</code> indicating whether the given stream of bytes represents a
* valid sample for its corresponding content type. If no content description is
* provided, this method should perform content type validation.
* <p>
* The input stream must be kept open, and any IOExceptions while
* reading the stream should flow to the caller.
* The input stream must be kept open, and any IOExceptions while reading the
* stream should flow to the caller.
* </p>
*
* @param contents the contents to be examined
* @param description a description to be filled in, or <code>null</code> if
* only content type validation is to be performed
* @return one of the following:<ul>
* <li><code>VALID</code></li>,
* <li><code>INVALID</code></li>,
* @return one of the following:
* <ul>
* <li><code>VALID</code></li>
* <li><code>INVALID</code></li>
* <li><code>INDETERMINATE</code></li>
* </ul>
* @throws IOException if an I/O error occurs
......
......@@ -22,12 +22,12 @@ import org.eclipse.core.runtime.QualifiedName;
* <p>
* A content description object will always include the content type for the
* examined contents, and may also include information on:
* </p>
* <ol>
* <li>charset;</li>
* <li>byte order mark;</li>
* <li>other custom properties provided by third-party plug-ins.</li>
* </ol>
* </p>
* <p>
* <cite>Content describers</cite> provided by plug-ins will fill in most of the
* properties in a content description object, except for the content type,
......
......@@ -46,7 +46,7 @@ public interface IContentType extends IContentTypeSettings {
int FILE_EXTENSION_SPEC = 0b1000;
/**
* File spec type constant, indicating a file name pattern specification.
* <code>?</code> represents any single character, <code>*<code> represent any
* <code>?</code> represents any single character, <code>*</code> represent any
* string.
*
* @since 3.7
......
......@@ -153,18 +153,19 @@ public interface IContentTypeManager extends IContentTypeMatcher {
}
/**
* Content type identifier constant for platform's primary
* text-based content type: <code>org.eclipse.core.runtime.text</code>.
* Content type identifier constant for platform's primary text-based content
* type: <code>org.eclipse.core.runtime.text</code>.
* <p>
* All text-based content types ought to be sub types of the content type
* identified by this string. This provides a simple way for detecting
* whether a content type is text-based:
* identified by this string. This provides a simple way for detecting whether a
* content type is text-based:
* </p>
*
* <pre>
* IContentType text = Platform.getContentTypeManager().getContentType(IContentTypeManager.CT_TEXT);
* IContentType someType = ...;
* boolean isTextBased = someType.isKindOf(text);
* </pre>
* </p>
*/
String CT_TEXT = "org.eclipse.core.runtime.text"; //$NON-NLS-1$
......
......@@ -49,7 +49,7 @@ import org.xml.sax.SAXException;
* If the "element" name part is "*", e.g. <code>{namespace}*</code>,
* it denotes a wildcard match. If the "element" namespace part is empty,
* e.g. <code>{}name</code>, only these documents with the root element
* that belong to the unnamed namespace <code><elem xmlns=""></code>
* that belong to the unnamed namespace <code>xmlns=""</code>
* will be detected.
* </p>
* <p>
......
......@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.core.expressions; singleton:=true
Bundle-Version: 3.6.200.qualifier
Bundle-Version: 3.6.300.qualifier
Bundle-ClassPath: .
Bundle-Activator: org.eclipse.core.internal.expressions.ExpressionPlugin
Bundle-Vendor: %providerName
......
......@@ -14,11 +14,11 @@
<parent>
<artifactId>eclipse.platform.runtime</artifactId>
<groupId>eclipse.platform.runtime</groupId>
<version>4.10.0-SNAPSHOT</version>
<version>4.11.0-SNAPSHOT</version>
<relativePath>../../</relativePath>
</parent>
<groupId>org.eclipse.core</groupId>
<artifactId>org.eclipse.core.expressions</artifactId>
<version>3.6.200-SNAPSHOT</version>
<version>3.6.300-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
......@@ -27,19 +27,17 @@ import org.eclipse.core.runtime.Assert;
* </code>, <code>or</code> and <code>not</code>. The operation are
* defined as follows:
* </p>
* <p>
* The and operation:
* </p>
* <table border="1" cellpadding="5">
* <table border="1" style="text-align: center;">
* <caption>The AND operation:</caption>
* <colgroup>
* <col width="120">
* <col width="120">
* <col width="120">
* <col width="120">
* <col style="width:120;">
* <col style="width:120;">
* <col style="width:120;">
* <col style="width:120;">
* </colgroup>
* <tbody>
* <tr>
* <td><em>AND</em></td>
* <td style="font-style: italic;">AND</td>
* <td>FALSE</td>
* <td>TRUE</td>
* <td>NOT_LOADED</td>
......@@ -64,19 +62,18 @@ import org.eclipse.core.runtime.Assert;
* </tr>
* </tbody>
* </table>
* <p>
* The or operation:
* </p>
* <table border="1" cellpadding="5">
* <br>
* <table border="1" style="text-align: center;">
* <caption>The OR operation:</caption>
* <colgroup>
* <col width="120">
* <col width="120">
* <col width="120">
* <col width="120">
* <col style="width:120;">
* <col style="width:120;">
* <col style="width:120;">
* <col style="width:120;">
* </colgroup>
* <tbody>
* <tr>
* <td><em>OR</em></td>
* <td style="font-style: italic;">OR</td>
* <td>FALSE</td>
* <td>TRUE</td>
* <td>NOT_LOADED</td>
......@@ -101,19 +98,18 @@ import org.eclipse.core.runtime.Assert;
* </tr>
* </tbody>
* </table>
* <p>
* The not operation:
* </p>
* <table border="1" cellpadding="5">
* <br>
* <table border="1" style="text-align: center;">
* <caption>The NOT operation:</caption>
* <colgroup>
* <col width="120">
* <col width="120">
* <col width="120">
* <col width="120">
* <col style="width:120;">
* <col style="width:120;">
* <col style="width:120;">
* <col style="width:120;">
* </colgroup>
* <tbody>
* <tr>
* <td><em>NOT<em></td>
* <td style="font-style: italic;">NOT</td>
* <td>FALSE</td>
* <td>TRUE</td>
* <td>NOT_LOADED</td>
......
......@@ -27,6 +27,7 @@ import org.eclipse.core.runtime.Platform;
* <p>
* A property tester implements the property tests enumerated in the property
* tester extension point. For the following property test extension
* </p>
* <pre>
* &lt;propertyTester
* namespace="org.eclipse.jdt.core"
......@@ -56,7 +57,6 @@ import org.eclipse.core.runtime.Platform;
* &lt;instanceof value="org.eclipse.core.IPackageFragment"/&gt;
* &lt;test property="org.eclipse.jdt.core.isDefaultPackage"/&gt;
* </pre>
* </p>
* <p>
* There is no guarantee that the same instance of a property tester is used
* to handle &lt;test property="..."/&gt; requests. So property testers
......
......@@ -30,7 +30,7 @@ A typical usage looks as follows:</p>
<p>The above expression tests, if the object under inspection (in most
cases the element selected in the user interface) is of instance
"org.eclipse.jdt.core.IJavaElement".</p>
<p><a name="test_expression0"><i><u>Test expression</u></i></a></p>
<p><i><u>Test expression</u></i></p>
<p>Besides instance of checks the new expression language defines an
extensible &lt;test&gt; element to support property testing. The
&lt;test&gt; element is comparable to the &lt;filter&gt; element used in
......@@ -89,7 +89,7 @@ meaning:</p>
</ul>
<p>The concrete implementation for the above property tester looks like
this:</p>
<blockquote><pre><font size="-1">public class ResourcePropertyTester extends PropertyTester {
<blockquote><pre style="font-size: small">public class ResourcePropertyTester extends PropertyTester {
private static final String PROPERTY_MATCHES_PATTERN= "matchesPattern"; //$NON-NLS-1$
......@@ -107,7 +107,7 @@ this:</p>
Assert.isTrue(false);
return false;
}
</font>}</pre></blockquote>
}</pre></blockquote>
<p>The string value provided by the value attribute is converted into a
Java object using the following rules:</p>
<ul>
......@@ -237,7 +237,7 @@ the following include element:
<blockquote><pre>
&lt;include schemaLocation="schema://org.eclipse.core.expressions/schema/expressionLanguage.exsd"/&gt;
</pre></blockquote>
<p><a name="converting"><u><i>Converting XML elements into expressions</i></u></a></p>
<p><u><i>Converting XML elements into expressions</i></u></p>
<p>XML elements can be converted into corresponding expression objects using the class ExpressionConverter.
If only expression tags from the common expression language are used, then the standard expression converter can be used.
The following example converts the configuration element representing an enablement element into an expression:</p>
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<component id="org.eclipse.core.jobs" version="2">
<resource path="src/org/eclipse/core/runtime/jobs/Job.java" type="org.eclipse.core.runtime.jobs.Job">
<filter comment="Bug 531276 - Mark Job.createSystem(ICoreRunnable) API for deletion" id="338944126">
<message_arguments>
<message_argument value="org.eclipse.core.runtime.jobs.Job"/>
<message_argument value="createSystem(ICoreRunnable)"/>
</message_arguments>
</filter>
</resource>
</component>
......@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.core.jobs; singleton:=true
Bundle-Version: 3.10.200.qualifier
Bundle-Version: 3.10.300.qualifier
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Export-Package: org.eclipse.core.internal.jobs;x-internal:=true,
......
......@@ -15,12 +15,12 @@
<parent>
<artifactId>eclipse.platform.runtime</artifactId>
<groupId>eclipse.platform.runtime</groupId>
<version>4.10.0-SNAPSHOT</version>
<version>4.11.0-SNAPSHOT</version>
<relativePath>../../</relativePath>
</parent>
<groupId>org.eclipse.core</groupId>
<artifactId>org.eclipse.core.jobs</artifactId>
<version>3.10.200-SNAPSHOT</version>
<version>3.10.300-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
<properties>
<code.ignoredWarnings>-warn:-deprecation,raw,unchecked</code.ignoredWarnings>
......
......@@ -62,13 +62,13 @@ public interface IJobManager {
/**
* Begins applying this rule in the calling thread. If the rule conflicts with another
* rule currently running in another thread, this method blocks until there are
* no conflicting rules. Calls to <tt>beginRule</tt> must eventually be followed
* by a matching call to <tt>endRule</tt> in the same thread and with the identical
* no conflicting rules. Calls to <code>beginRule</code> must eventually be followed
* by a matching call to <code>endRule</code> in the same thread and with the identical
* rule instance.
* <p>
* Rules can be nested only if the rule for the inner <tt>beginRule</tt>
* is contained within the rule for the outer <tt>beginRule</tt>. Rule containment
* is tested with the API method <tt>ISchedulingRule.contains</tt>. Also, begin/end
* Rules can be nested only if the rule for the inner <code>beginRule</code>
* is contained within the rule for the outer <code>beginRule</code>. Rule containment
* is tested with the API method <code>ISchedulingRule.contains</code>. Also, begin/end
* pairs must be strictly nested. Only the rule that has most recently begun
* can be ended at any given time.
* <p>
......@@ -79,7 +79,7 @@ public interface IJobManager {
* If this method is called from within a job that has a scheduling rule, the
* given rule must also be contained within the rule for the running job.
* <p>
* Note that <tt>endRule</tt> must be called even if <tt>beginRule</tt> fails.
* Note that <code>endRule</code> must be called even if <code>beginRule</code> fails.
* The recommended usage is:
* <pre>
* final ISchedulingRule rule = ...;
......@@ -169,12 +169,12 @@ public interface IJobManager {
Job currentJob();
/**
* Ends the application of a rule to the calling thread. Calls to <tt>endRule</tt>
* must be preceded by a matching call to <tt>beginRule</tt> in the same thread
* Ends the application of a rule to the calling thread. Calls to <code>endRule</code>
* must be preceded by a matching call to <code>beginRule</code> in the same thread
* with an identical rule instance.
* <p>
* Rules can be nested only if the rule for the inner <tt>beginRule</tt>
* is contained within the rule for the outer <tt>beginRule</tt>. Also, begin/end
* Rules can be nested only if the rule for the inner <code>beginRule</code>
* is contained within the rule for the outer <code>beginRule</code>. Also, begin/end
* pairs must be strictly nested. Only the rule that has most recently begun
* can be ended at any given time.
*
......