Skip to content

Commit

Permalink
Initial fixes DPI scaling and FormEditor issues.
Browse files Browse the repository at this point in the history
  • Loading branch information
gbr committed Feb 9, 2023
1 parent e64ae63 commit a423d04
Show file tree
Hide file tree
Showing 26 changed files with 401 additions and 296 deletions.
17 changes: 0 additions & 17 deletions .project
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,7 @@
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</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.m2e.core.maven2Nature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
</natures>
</projectDescription>
7 changes: 0 additions & 7 deletions META-INF/MANIFEST.MF

This file was deleted.

12 changes: 0 additions & 12 deletions net.certiv.tools.indentguide.feature/.project
Original file line number Diff line number Diff line change
Expand Up @@ -5,19 +5,7 @@
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.pde.FeatureBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.pde.FeatureNature</nature>
</natures>
</projectDescription>
4 changes: 1 addition & 3 deletions net.certiv.tools.indentguide.feature/build.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,2 @@
bin.includes = feature.xml
src.includes = feature.xml,\
build.properties,\
.project
src.includes = feature.xml
24 changes: 14 additions & 10 deletions net.certiv.tools.indentguide.feature/feature.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@
<feature
id="net.certiv.tools.indentguide.feature"
label="IndentGuide"
version="1.7.0.qualifier"
version="1.8.0.qualifier"
provider-name="Certiv Analytis">

<description>
IndentGuide adds configurable indent guide lines in Eclipse text editors.
</description>

<copyright>
Copyright (c) 2006-2018 The IndentGuide Authors.
Copyright (c) 2006-2023 The IndentGuide Authors.
All rights reserved.
</copyright>

<license url="">
The MIT License (MIT)

Copyright (c) 2006-2021 the IndentGuide Authors.
Copyright (c) 2006-2023 the IndentGuide Authors.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the &quot;Software&quot;), to deal
Expand All @@ -39,21 +39,25 @@ SOFTWARE.
</license>

<url>
<update label="Certiv Tools" url="https://www.certiv.net/update"/>
<update label="Certiv Tools" url="https://www.certiv.net/updates"/>
</url>

<requires>
<import plugin="org.eclipse.ui" version="3.109.100" match="compatible"/>
<import plugin="org.eclipse.core.runtime" version="3.14.0" match="compatible"/>
<import plugin="org.eclipse.jface.text" version="3.13.0" match="compatible"/>
<import plugin="org.eclipse.ui.workbench.texteditor" version="3.11.0" match="compatible"/>
<import plugin="org.eclipse.e4.ui.css.swt.theme"/>
<import plugin="org.eclipse.ui" version="3.201.200" match="compatible"/>
<import plugin="org.eclipse.core.runtime" version="3.26.100" match="compatible"/>
<import plugin="org.eclipse.jface.text" version="3.22.0" match="compatible"/>
<import plugin="org.eclipse.ui.workbench.texteditor" version="3.16.600" match="compatible"/>
<import plugin="org.eclipse.e4.core.services" version="2.3.400" match="compatible"/>
<import plugin="org.eclipse.e4.ui.css.swt.theme" version="0.13.200" match="compatible"/>
<import plugin="org.eclipse.osgi.services" version="3.11.100" match="compatible"/>
<import plugin="org.eclipse.ui.forms" version="3.11.500" match="compatible"/>
</requires>

<plugin
id="net.certiv.tools.indentguide"
download-size="0"
install-size="0"
version="0.0.0"/>
version="0.0.0"
unpack="false"/>

</feature>
7 changes: 3 additions & 4 deletions net.certiv.tools.indentguide.feature/pom.xml
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

<modelVersion>4.0.0</modelVersion>
<packaging>eclipse-feature</packaging>

<parent>
<groupId>net.certiv</groupId>
<artifactId>net.certiv.tools.indentguide.parent</artifactId>
<version>1.7.0-SNAPSHOT</version>
<artifactId>net.certiv.tools.indentguide.parent</artifactId>
<version>1.8.0-SNAPSHOT</version>
</parent>

<artifactId>net.certiv.tools.indentguide.feature</artifactId>

</project>
2 changes: 1 addition & 1 deletion net.certiv.tools.indentguide.plugin/.project
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
21 changes: 11 additions & 10 deletions net.certiv.tools.indentguide.plugin/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,17 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: IndentGuide
Bundle-SymbolicName: net.certiv.tools.indentguide;singleton:=true
Bundle-Version: 1.7.0.qualifier
Bundle-Version: 1.8.0.qualifier
Bundle-Activator: net.certiv.tools.indentguide.Activator
Require-Bundle: org.eclipse.ui;bundle-version="[3.109.100,4.0.0)",
org.eclipse.core.runtime;bundle-version="[3.14.0,4.0.0)",
org.eclipse.jface.text;bundle-version="[3.13.0,4.0.0)",
org.eclipse.ui.workbench.texteditor;bundle-version="[3.11.0,4.0.0)",
org.eclipse.e4.core.services;bundle-version="2.3.0",
org.eclipse.e4.ui.css.swt.theme;bundle-version="0.13.0",
org.eclipse.osgi.services
Bundle-RequiredExecutionEnvironment: JavaSE-11
Bundle-Vendor: Certiv Analytics
Automatic-Module-Name: net.certiv.tools.indentguide
Require-Bundle: org.eclipse.core.runtime;bundle-version="[3.26.100,4.0.0)",
org.eclipse.e4.core.services;bundle-version="[2.3.400,3.0.0)",
org.eclipse.e4.ui.css.swt.theme;bundle-version="[0.13.200,1.0.0)",
org.eclipse.jface.text;bundle-version="[3.22.0,4.0.0)",
org.eclipse.osgi.services;bundle-version="[3.11.100,4.0.0)",
org.eclipse.ui;bundle-version="[3.201.200,4.0.0)",
org.eclipse.ui.forms;bundle-version="[3.11.500,4.0.0)",
org.eclipse.ui.workbench.texteditor;bundle-version="[3.16.600,4.0.0)"
Bundle-RequiredExecutionEnvironment: JavaSE-11
Automatic-Module-Name: net.certiv.tools.indentguide.singleton.true
Bundle-ActivationPolicy: lazy
2 changes: 1 addition & 1 deletion net.certiv.tools.indentguide.plugin/build.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ bin.includes = plugin.xml,\
.,\
META-INF/,\
OSGI-INF/,\
attic/css/
icons/
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 0 additions & 2 deletions net.certiv.tools.indentguide.plugin/plugin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,11 @@
class="net.certiv.tools.indentguide.preferences.Initializer">
</initializer>
</extension>

<extension
point="org.eclipse.ui.startup">
<startup
class="net.certiv.tools.indentguide.Starter">
</startup>
</extension>


</plugin>
4 changes: 2 additions & 2 deletions net.certiv.tools.indentguide.plugin/pom.xml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">

<modelVersion>4.0.0</modelVersion>
<packaging>eclipse-plugin</packaging>

<parent>
<groupId>net.certiv</groupId>
<artifactId>net.certiv.tools.indentguide.parent</artifactId>
<version>1.7.0-SNAPSHOT</version>
<version>1.8.0-SNAPSHOT</version>
</parent>

<artifactId>net.certiv.tools.indentguide</artifactId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/******************************************************************************
* Copyright (c) 2006-2021 The IndentGuide Authors.
* Copyright (c) 2006-2023 The IndentGuide Authors.
* All rights reserved.
*
* This program and the accompanying materials are made available under the
Expand Down Expand Up @@ -39,7 +39,7 @@ public class Activator extends AbstractUIPlugin {
private static Activator plugin;

private final IEclipsePreferences[] scopes = new IEclipsePreferences[2];
private final EventHandler themeEventHandler = event -> {
private final EventHandler themeChange = event -> {
disposeLineColor();
log("Theme change '%s'", event);
};
Expand All @@ -51,22 +51,22 @@ public Activator() {
}

/** Returns the shared instance */
public static Activator getDefault() {
return plugin;
}
public static Activator getDefault() { return plugin; }

@Override
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;

log("Indent guide: startup");

scopes[0] = InstanceScope.INSTANCE.getNode(EditorsID);
scopes[1] = DefaultScope.INSTANCE.getNode(EditorsID);

IWorkbench wb = PlatformUI.getWorkbench();
IEventBroker broker = wb.getService(IEventBroker.class);
if (broker != null) {
broker.subscribe(IThemeEngine.Events.THEME_CHANGED, themeEventHandler);
broker.subscribe(IThemeEngine.Events.THEME_CHANGED, themeChange);
}
}

Expand All @@ -75,12 +75,11 @@ public void stop(BundleContext context) throws Exception {
IWorkbench wb = PlatformUI.getWorkbench();
IEventBroker broker = wb.getService(IEventBroker.class);
if (broker != null) {
broker.unsubscribe(themeEventHandler);
broker.unsubscribe(themeChange);
}

disposeLineColor();
scopes[0] = scopes[1] = null;

plugin = null;
super.stop(context);
}
Expand All @@ -99,9 +98,8 @@ public Color getColor() {
}

/**
* Returns {@code true} if the current theme is 'dark', defined as where the
* foreground color is relatively darker than the background color. (black ->
* '0'; white -> '255*3')
* Returns {@code true} if the current theme is 'dark', defined as where the foreground color is
* relatively darker than the background color. (black -> '0'; white -> '255*3')
*/
public boolean isDarkTheme() {
RGB fg = getRawRGB(AbstractTextEditor.PREFERENCE_COLOR_FOREGROUND);
Expand Down
Loading

0 comments on commit a423d04

Please sign in to comment.