-
Notifications
You must be signed in to change notification settings - Fork 112
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a fragment that supports linux native polling using panama
This adds native polling support for linux with the inotify API.
- Loading branch information
Showing
24 changed files
with
1,969 additions
and
0 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
resources/bundles/org.eclipse.core.resources.linux.x86_64/.classpath
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,11 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="src" path="src"/> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk-17.0.2"> | ||
<attributes> | ||
<attribute name="module" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/> | ||
<classpathentry kind="output" path="bin"/> | ||
</classpath> |
28 changes: 28 additions & 0 deletions
28
resources/bundles/org.eclipse.core.resources.linux.x86_64/.project
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,28 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>org.eclipse.core.resources.linux.x86_64</name> | ||
<comment></comment> | ||
<projects> | ||
</projects> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.jdt.core.javabuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.pde.ManifestBuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.pde.SchemaBuilder</name> | ||
<arguments> | ||
</arguments> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.pde.PluginNature</nature> | ||
<nature>org.eclipse.jdt.core.javanature</nature> | ||
</natures> | ||
</projectDescription> |
3 changes: 3 additions & 0 deletions
3
...undles/org.eclipse.core.resources.linux.x86_64/.settings/org.eclipse.core.resources.prefs
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,3 @@ | ||
eclipse.preferences.version=1 | ||
encoding/<project>=UTF-8 | ||
encoding/fragment.properties=ISO-8859-1 |
9 changes: 9 additions & 0 deletions
9
...rces/bundles/org.eclipse.core.resources.linux.x86_64/.settings/org.eclipse.jdt.core.prefs
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,9 @@ | ||
eclipse.preferences.version=1 | ||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 | ||
org.eclipse.jdt.core.compiler.compliance=11 | ||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error | ||
org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled | ||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error | ||
org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning | ||
org.eclipse.jdt.core.compiler.release=enabled | ||
org.eclipse.jdt.core.compiler.source=11 |
10 changes: 10 additions & 0 deletions
10
resources/bundles/org.eclipse.core.resources.linux.x86_64/META-INF/MANIFEST.MF
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,10 @@ | ||
Manifest-Version: 1.0 | ||
Bundle-ManifestVersion: 2 | ||
Bundle-Name: %linuxFragmentName | ||
Bundle-SymbolicName: org.eclipse.core.resources.linux.x86_64 | ||
Bundle-Vendor: %providerName | ||
Bundle-Version: 1.0.0.qualifier | ||
Eclipse-PlatformFilter: (& (osgi.os=linux) (osgi.arch=x86_64)) | ||
Fragment-Host: org.eclipse.core.resources;bundle-version="3.18.200" | ||
Automatic-Module-Name: org.eclipse.core.resources.linux.x86.64 | ||
Bundle-RequiredExecutionEnvironment: JavaSE-11 |
3 changes: 3 additions & 0 deletions
3
...bundles/org.eclipse.core.resources.linux.x86_64/META-INF/versions/17/OSGI-INF/MANIFEST.MF
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,3 @@ | ||
Manifest-Version: 1.0 | ||
Import-Package: jdk.incubator.foreign | ||
Require-Capability: (&(osgi.ee=JavaSE)(version=17)) |
3 changes: 3 additions & 0 deletions
3
...bundles/org.eclipse.core.resources.linux.x86_64/META-INF/versions/19/OSGI-INF/MANIFEST.MF
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,3 @@ | ||
Manifest-Version: 1.0 | ||
Import-Package: jdk.incubator.foreign | ||
Require-Capability: (&(osgi.ee=JavaSE)(version=19)) |
10 changes: 10 additions & 0 deletions
10
resources/bundles/org.eclipse.core.resources.linux.x86_64/README.MD
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,10 @@ | ||
# Linux native binding for platform.resources | ||
|
||
This fragment provides native binding to the linux host system using the [Project Panama](https://openjdk.org/projects/panama/). | ||
The wrapped API is the inotify API (https://man7.org/linux/man-pages/man7/inotify.7.html) | ||
|
||
Generate the code: | ||
- sudo apt-get install libinotifytools0-dev | ||
- get a suitable jextract from https://jdk.java.net/panama/ (Java 19) or https://jdk.java.net/panama/17/ (Java 17) | ||
- enter the src<java version> directory | ||
- jextract --source -t org.eclipse.core.internal.resources.refresh.linux.inotify /usr/include/inotifytools/inotify.h |
36 changes: 36 additions & 0 deletions
36
resources/bundles/org.eclipse.core.resources.linux.x86_64/about.html
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,36 @@ | ||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | ||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | ||
<html xmlns="http://www.w3.org/1999/xhtml"> | ||
<head> | ||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" /> | ||
<title>About</title> | ||
</head> | ||
<body lang="EN-US"> | ||
<h2>About This Content</h2> | ||
|
||
<p>November 30, 2017</p> | ||
<h3>License</h3> | ||
|
||
<p> | ||
The Eclipse Foundation makes available all content in this plug-in | ||
("Content"). Unless otherwise indicated below, the Content | ||
is provided to you under the terms and conditions of the Eclipse | ||
Public License Version 2.0 ("EPL"). A copy of the EPL is | ||
available at <a href="http://www.eclipse.org/legal/epl-2.0">http://www.eclipse.org/legal/epl-2.0</a>. | ||
For purposes of the EPL, "Program" will mean the Content. | ||
</p> | ||
|
||
<p> | ||
If you did not receive this Content directly from the Eclipse | ||
Foundation, the Content is being redistributed by another party | ||
("Redistributor") and different terms and conditions may | ||
apply to your use of any object code in the Content. Check the | ||
Redistributor's license that was provided with the Content. If no such | ||
license exists, contact the Redistributor. Unless otherwise indicated | ||
below, the terms and conditions of the EPL still apply to any source | ||
code in the Content and such source code may be obtained at <a | ||
href="http://www.eclipse.org/">http://www.eclipse.org</a>. | ||
</p> | ||
|
||
</body> | ||
</html> |
4 changes: 4 additions & 0 deletions
4
resources/bundles/org.eclipse.core.resources.linux.x86_64/build.properties
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,4 @@ | ||
source.. = src/ | ||
output.. = bin/ | ||
bin.includes = META-INF/,\ | ||
. |
16 changes: 16 additions & 0 deletions
16
resources/bundles/org.eclipse.core.resources.linux.x86_64/fragment.properties
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,16 @@ | ||
############################################################################### | ||
# Copyright (c) 2023 Christoph Läubrich and others. | ||
# | ||
# This program and the accompanying materials | ||
# are made available under the terms of the Eclipse Public License 2.0 | ||
# which accompanies this distribution, and is available at | ||
# https://www.eclipse.org/legal/epl-2.0/ | ||
# | ||
# SPDX-License-Identifier: EPL-2.0 | ||
# | ||
# Contributors: | ||
# Christoph Läubrich - initial API and implementation | ||
############################################################################### | ||
providerName = Eclipse.org | ||
linuxragmentName = Core Resource Management Linux Fragment | ||
linuxMonitorFactoryName = Linux Auto-refresh monitor |
12 changes: 12 additions & 0 deletions
12
resources/bundles/org.eclipse.core.resources.linux.x86_64/fragment.xml
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,12 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<?eclipse version="3.0"?> | ||
<fragment> | ||
<extension | ||
id="win32" | ||
point="org.eclipse.core.resources.refreshProviders"> | ||
<refreshProvider | ||
name="%linuxMonitorFactoryName" | ||
class="org.eclipse.core.internal.resources.refresh.linux.LinuxRefreshProvider"> | ||
</refreshProvider> | ||
</extension> | ||
</fragment> |
23 changes: 23 additions & 0 deletions
23
...ux.x86_64/src/org/eclipse/core/internal/resources/refresh/linux/LinuxRefreshProvider.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,23 @@ | ||
/******************************************************************************** | ||
* Copyright (c) 2023 Christoph Läubrich and others | ||
* | ||
* This program and the accompanying materials are made available under the | ||
* terms of the Eclipse Public License 2.0 which is available at | ||
* http://www.eclipse.org/legal/epl-2.0. | ||
* | ||
* SPDX-License-Identifier: EPL-2.0 | ||
* | ||
* Contributors: | ||
* Christoph Läubrich - initial API and implementation | ||
********************************************************************************/ | ||
package org.eclipse.core.internal.resources.refresh.linux; | ||
|
||
import org.eclipse.core.resources.refresh.RefreshProvider; | ||
|
||
/** | ||
* The default implementation simply do nothing what will result in fallback to | ||
* the plain polling | ||
*/ | ||
public class LinuxRefreshProvider extends RefreshProvider { | ||
|
||
} |
Oops, something went wrong.