Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion resources/bundles/org.eclipse.core.filesystem/.classpath
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-17"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-25"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="src-gen">
<attributes>
<attribute name="ignore_optional_problems" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="bin"/>
</classpath>
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ org.eclipse.jdt.core.compiler.annotation.nullable=org.eclipse.jdt.annotation.Nul
org.eclipse.jdt.core.compiler.annotation.nullanalysis=disabled
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
org.eclipse.jdt.core.compiler.codegen.targetPlatform=17
org.eclipse.jdt.core.compiler.codegen.targetPlatform=25
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=17
org.eclipse.jdt.core.compiler.compliance=25
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
Expand Down Expand Up @@ -73,7 +73,7 @@ org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
org.eclipse.jdt.core.compiler.problem.missingSynchronizedOnInheritedMethod=ignore
org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=error
org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
org.eclipse.jdt.core.compiler.problem.nonnullParameterAnnotationDropped=warning
org.eclipse.jdt.core.compiler.problem.nullAnnotationInferenceConflict=error
org.eclipse.jdt.core.compiler.problem.nullReference=warning
Expand Down Expand Up @@ -112,7 +112,7 @@ org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionExemptExcepti
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=enabled
org.eclipse.jdt.core.compiler.problem.unusedExceptionParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedImport=error
org.eclipse.jdt.core.compiler.problem.unusedImport=warning
org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
org.eclipse.jdt.core.compiler.problem.unusedLocal=error
org.eclipse.jdt.core.compiler.problem.unusedObjectAllocation=ignore
Expand All @@ -125,7 +125,7 @@ org.eclipse.jdt.core.compiler.problem.unusedTypeParameter=ignore
org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
org.eclipse.jdt.core.compiler.release=enabled
org.eclipse.jdt.core.compiler.source=17
org.eclipse.jdt.core.compiler.source=25
org.eclipse.jdt.core.formatter.align_type_members_on_columns=false
org.eclipse.jdt.core.formatter.alignment_for_additive_operator=16
org.eclipse.jdt.core.formatter.alignment_for_arguments_in_allocation_expression=16
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ sp_cleanup.pull_up_assignment=false
sp_cleanup.push_down_negation=false
sp_cleanup.qualify_static_field_accesses_with_declaring_class=false
sp_cleanup.qualify_static_member_accesses_through_instances_with_declaring_class=true
sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=true
sp_cleanup.qualify_static_member_accesses_through_subtypes_with_declaring_class=false
sp_cleanup.qualify_static_member_accesses_with_declaring_class=true
sp_cleanup.qualify_static_method_accesses_with_declaring_class=false
sp_cleanup.reduce_indentation=false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.core.filesystem; singleton:=true
Bundle-Version: 1.11.600.qualifier
Bundle-Version: 1.12.0.qualifier
Bundle-Localization: plugin
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.29.0,4.0.0)"
Export-Package: org.eclipse.core.filesystem;uses:="org.eclipse.core.runtime",
Expand All @@ -11,8 +11,6 @@ Export-Package: org.eclipse.core.filesystem;uses:="org.eclipse.core.runtime",
org.eclipse.core.internal.filesystem.local;x-internal:=true,
org.eclipse.core.internal.filesystem.local.unix;x-internal:=true
Bundle-Vendor: %providerName
Bundle-RequiredExecutionEnvironment: JavaSE-17
Bundle-RequiredExecutionEnvironment: JavaSE-25
Bundle-ActivationPolicy: lazy
Automatic-Module-Name: org.eclipse.core.filesystem
Import-Package: com.sun.jna;version="[5.14.0,6.0.0)",
com.sun.jna.platform.win32;version="[5.14.0,6.0.0)"
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
# Contributors:
# IBM Corporation - initial API and implementation
###############################################################################
source.. = src/
source.. = src/,\
src-gen/
output.. = bin/
bin.includes = META-INF/,\
.,\
Expand Down
32 changes: 32 additions & 0 deletions resources/bundles/org.eclipse.core.filesystem/generateWindowsH.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@

set "MSVC_HOME=C:\Program Files\Microsoft Visual Studio\2022\Community"
call "%MSVC_HOME%\VC\Auxiliary\Build\vcvarsall.bat" x64

@echo on

jextract --output src-gen ^
--include-function GetShortPathNameW ^
--include-function GetFileAttributesW ^
--include-function SetFileAttributesW ^
--include-function FindFirstFileW ^
--include-function FindClose ^
--include-typedef WIN32_FIND_DATAW ^
--include-struct _WIN32_FIND_DATAW ^
--include-typedef FILETIME ^
--include-struct _FILETIME ^
--include-constant FILE_ATTRIBUTE_NORMAL ^
--include-constant FILE_ATTRIBUTE_ARCHIVE ^
--include-constant FILE_ATTRIBUTE_READONLY ^
--include-constant FILE_ATTRIBUTE_HIDDEN ^
--include-constant FILE_ATTRIBUTE_DIRECTORY ^
--include-constant FILE_ATTRIBUTE_REPARSE_POINT ^
--include-constant IO_REPARSE_TAG_SYMLINK ^
--include-constant INVALID_FILE_ATTRIBUTES ^
--include-constant INVALID_HANDLE_VALUE ^
--include-constant ERROR_FILE_NOT_FOUND ^
--include-constant ERROR_PATH_NOT_FOUND ^
--target-package com.microsoft.windows ^
--header-class-name FileAPI ^
--library kernel32 ^
--include-dir "%INCLUDE%" ^
"Windows.h"
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
// Generated by jextract

package com.microsoft.windows;

import java.lang.invoke.*;

Check warning on line 5 in resources/bundles/org.eclipse.core.filesystem/src-gen/com/microsoft/windows/FILETIME.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Unnecessary Code

NORMAL: The import java.lang.invoke is never used
import java.lang.foreign.*;

Check warning on line 6 in resources/bundles/org.eclipse.core.filesystem/src-gen/com/microsoft/windows/FILETIME.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Unnecessary Code

NORMAL: The import java.lang.foreign is never used
import java.nio.ByteOrder;

Check warning on line 7 in resources/bundles/org.eclipse.core.filesystem/src-gen/com/microsoft/windows/FILETIME.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Unnecessary Code

NORMAL: The import java.nio.ByteOrder is never used
import java.util.*;

Check warning on line 8 in resources/bundles/org.eclipse.core.filesystem/src-gen/com/microsoft/windows/FILETIME.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Unnecessary Code

NORMAL: The import java.util is never used
import java.util.function.*;

Check warning on line 9 in resources/bundles/org.eclipse.core.filesystem/src-gen/com/microsoft/windows/FILETIME.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Unnecessary Code

NORMAL: The import java.util.function is never used
import java.util.stream.*;

Check warning on line 10 in resources/bundles/org.eclipse.core.filesystem/src-gen/com/microsoft/windows/FILETIME.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Unnecessary Code

NORMAL: The import java.util.stream is never used

import static java.lang.foreign.ValueLayout.*;

Check warning on line 12 in resources/bundles/org.eclipse.core.filesystem/src-gen/com/microsoft/windows/FILETIME.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Unnecessary Code

NORMAL: The import java.lang.foreign.ValueLayout is never used
import static java.lang.foreign.MemoryLayout.PathElement.*;

Check warning on line 13 in resources/bundles/org.eclipse.core.filesystem/src-gen/com/microsoft/windows/FILETIME.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Unnecessary Code

NORMAL: The import java.lang.foreign.MemoryLayout.PathElement is never used

/**
* {@snippet lang=c :
* typedef struct _FILETIME {
* DWORD dwLowDateTime;
* DWORD dwHighDateTime;
* } FILETIME
* }
*/
public class FILETIME extends _FILETIME {

FILETIME() {
// Should not be called directly
}
}

Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
// Generated by jextract

package com.microsoft.windows;

import java.lang.invoke.*;
import java.lang.foreign.*;
import java.nio.ByteOrder;

Check warning on line 7 in resources/bundles/org.eclipse.core.filesystem/src-gen/com/microsoft/windows/FileAPI$shared.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Unnecessary Code

NORMAL: The import java.nio.ByteOrder is never used
import java.util.*;
import java.util.function.*;

Check warning on line 9 in resources/bundles/org.eclipse.core.filesystem/src-gen/com/microsoft/windows/FileAPI$shared.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Unnecessary Code

NORMAL: The import java.util.function is never used
import java.util.stream.*;

import static java.lang.foreign.ValueLayout.*;

Check warning on line 12 in resources/bundles/org.eclipse.core.filesystem/src-gen/com/microsoft/windows/FileAPI$shared.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Unnecessary Code

NORMAL: The import java.lang.foreign.ValueLayout is never used
import static java.lang.foreign.MemoryLayout.PathElement.*;

Check warning on line 13 in resources/bundles/org.eclipse.core.filesystem/src-gen/com/microsoft/windows/FileAPI$shared.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

Unnecessary Code

NORMAL: The import java.lang.foreign.MemoryLayout.PathElement is never used

public class FileAPI$shared {

FileAPI$shared() {
// Should not be called directly
}

public static final ValueLayout.OfBoolean C_BOOL = (ValueLayout.OfBoolean) Linker.nativeLinker().canonicalLayouts().get("bool");

Check warning on line 21 in resources/bundles/org.eclipse.core.filesystem/src-gen/com/microsoft/windows/FileAPI$shared.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

NLS

NORMAL: $ Non-externalized string literal; it should be followed by //$NON-NLS-
public static final ValueLayout.OfByte C_CHAR =(ValueLayout.OfByte)Linker.nativeLinker().canonicalLayouts().get("char");

Check warning on line 22 in resources/bundles/org.eclipse.core.filesystem/src-gen/com/microsoft/windows/FileAPI$shared.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

NLS

NORMAL: $ Non-externalized string literal; it should be followed by //$NON-NLS-
public static final ValueLayout.OfShort C_SHORT = (ValueLayout.OfShort) Linker.nativeLinker().canonicalLayouts().get("short");

Check warning on line 23 in resources/bundles/org.eclipse.core.filesystem/src-gen/com/microsoft/windows/FileAPI$shared.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

NLS

NORMAL: $ Non-externalized string literal; it should be followed by //$NON-NLS-
public static final ValueLayout.OfInt C_INT = (ValueLayout.OfInt) Linker.nativeLinker().canonicalLayouts().get("int");

Check warning on line 24 in resources/bundles/org.eclipse.core.filesystem/src-gen/com/microsoft/windows/FileAPI$shared.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

NLS

NORMAL: $ Non-externalized string literal; it should be followed by //$NON-NLS-
public static final ValueLayout.OfLong C_LONG_LONG = (ValueLayout.OfLong) Linker.nativeLinker().canonicalLayouts().get("long long");

Check warning on line 25 in resources/bundles/org.eclipse.core.filesystem/src-gen/com/microsoft/windows/FileAPI$shared.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

NLS

NORMAL: $ Non-externalized string literal; it should be followed by //$NON-NLS-
public static final ValueLayout.OfFloat C_FLOAT = (ValueLayout.OfFloat) Linker.nativeLinker().canonicalLayouts().get("float");

Check warning on line 26 in resources/bundles/org.eclipse.core.filesystem/src-gen/com/microsoft/windows/FileAPI$shared.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

NLS

NORMAL: $ Non-externalized string literal; it should be followed by //$NON-NLS-
public static final ValueLayout.OfDouble C_DOUBLE = (ValueLayout.OfDouble) Linker.nativeLinker().canonicalLayouts().get("double");

Check warning on line 27 in resources/bundles/org.eclipse.core.filesystem/src-gen/com/microsoft/windows/FileAPI$shared.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

NLS

NORMAL: $ Non-externalized string literal; it should be followed by //$NON-NLS-
public static final AddressLayout C_POINTER = ((AddressLayout) Linker.nativeLinker().canonicalLayouts().get("void*"))

Check warning on line 28 in resources/bundles/org.eclipse.core.filesystem/src-gen/com/microsoft/windows/FileAPI$shared.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

NLS

NORMAL: $ Non-externalized string literal; it should be followed by //$NON-NLS-
.withTargetLayout(MemoryLayout.sequenceLayout(java.lang.Long.MAX_VALUE, C_CHAR));
public static final ValueLayout.OfInt C_LONG = (ValueLayout.OfInt) Linker.nativeLinker().canonicalLayouts().get("long");

Check warning on line 30 in resources/bundles/org.eclipse.core.filesystem/src-gen/com/microsoft/windows/FileAPI$shared.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

NLS

NORMAL: $ Non-externalized string literal; it should be followed by //$NON-NLS-
public static final ValueLayout.OfDouble C_LONG_DOUBLE = (ValueLayout.OfDouble) Linker.nativeLinker().canonicalLayouts().get("double");

Check warning on line 31 in resources/bundles/org.eclipse.core.filesystem/src-gen/com/microsoft/windows/FileAPI$shared.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

NLS

NORMAL: $ Non-externalized string literal; it should be followed by //$NON-NLS-

static final boolean TRACE_DOWNCALLS = Boolean.getBoolean("jextract.trace.downcalls");

Check warning on line 33 in resources/bundles/org.eclipse.core.filesystem/src-gen/com/microsoft/windows/FileAPI$shared.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

NLS

NORMAL: $ Non-externalized string literal; it should be followed by //$NON-NLS-

static void traceDowncall(String name, Object... args) {
String traceArgs = Arrays.stream(args)
.map(Object::toString)
.collect(Collectors.joining(", "));

Check warning on line 38 in resources/bundles/org.eclipse.core.filesystem/src-gen/com/microsoft/windows/FileAPI$shared.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

NLS

NORMAL: $ Non-externalized string literal; it should be followed by //$NON-NLS-
System.out.printf("%s(%s)\n", name, traceArgs);

Check warning on line 39 in resources/bundles/org.eclipse.core.filesystem/src-gen/com/microsoft/windows/FileAPI$shared.java

View check run for this annotation

Jenkins - Eclipse Platform / Compiler

NLS

NORMAL: $ Non-externalized string literal; it should be followed by //$NON-NLS-
}

static MethodHandle upcallHandle(Class<?> fi, String name, FunctionDescriptor fdesc) {
try {
return MethodHandles.lookup().findVirtual(fi, name, fdesc.toMethodType());
} catch (ReflectiveOperationException ex) {
throw new AssertionError(ex);
}
}

static MemoryLayout align(MemoryLayout layout, long align) {
return switch (layout) {
case PaddingLayout p -> p;
case ValueLayout v -> v.withByteAlignment(align);
case GroupLayout g -> {
MemoryLayout[] alignedMembers = g.memberLayouts().stream()
.map(m -> align(m, align)).toArray(MemoryLayout[]::new);
yield g instanceof StructLayout ?
MemoryLayout.structLayout(alignedMembers) : MemoryLayout.unionLayout(alignedMembers);
}
case SequenceLayout s -> MemoryLayout.sequenceLayout(s.elementCount(), align(s.elementLayout(), align));
};
}
}

Loading
Loading