Coder Social home page Coder Social logo

eclipse / dartboard Goto Github PK

View Code? Open in Web Editor NEW
55.0 11.0 20.0 451 KB

Dart Plugin for Eclipse

Home Page: https://marketplace.eclipse.org/content/dart-plugin-eclipse-0

License: Eclipse Public License 2.0

Java 99.59% Dart 0.09% Dockerfile 0.33%
dart eclipse eclipse-plugin flutter

dartboard's People

Contributors

ietz avatar jonas-jonas avatar kys3rk1ng avatar lak-proddev avatar nawakland avatar ppazderski avatar vogella avatar wimjongman avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dartboard's Issues

No code completion for constructor creation

I see no code completion for constructor creation. Maybe this is not yet supported by the Dart language server?

class Gerrit {
	final String subject;
	final String created;
	User (this.sub -> [Code completion here returns nothing])	
}

ClassCastException when typing on Dart preference page

!ENTRY org.eclipse.ui 4 0 2019-06-28 12:21:33.412
!MESSAGE Unhandled event loop exception
!STACK 0
java.lang.ClassCastException: java.lang.Boolean cannot be cast to java.lang.String
at org.eclipse.dartboard.preference.DartPreferencePage.propertyChange(DartPreferencePage.java:131)
at org.eclipse.jface.preference.FieldEditor.fireValueChanged(FieldEditor.java:350)
at org.eclipse.jface.preference.FieldEditor.fireStateChanged(FieldEditor.java:333)
at org.eclipse.jface.preference.StringFieldEditor.valueChanged(StringFieldEditor.java:496)
at org.eclipse.jface.preference.StringFieldEditor$4.focusLost(StringFieldEditor.java:358)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:147)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4131)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1056)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1080)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1061)
at org.eclipse.swt.widgets.Control.sendFocusEvent(Control.java:2952)
at org.eclipse.swt.widgets.Widget.wmKillFocus(Widget.java:1818)
at org.eclipse.swt.widgets.Control.WM_KILLFOCUS(Control.java:5152)
at org.eclipse.swt.widgets.Control.windowProc(Control.java:4793)
at org.eclipse.swt.widgets.Text.windowProc(Text.java:2528)
at org.eclipse.swt.widgets.Display.windowProc(Display.java:4778)
at org.eclipse.swt.internal.win32.OS.PeekMessage(Native Method)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3542)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:823)
at org.eclipse.jface.window.Window.open(Window.java:799)
at org.eclipse.ui.internal.OpenPreferencesAction.run(OpenPreferencesAction.java:66)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:474)
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:580)
at org.eclipse.jface.action.ActionContributionItem.lambda$4(ActionContributionItem.java:412)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:89)
at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4131)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1056)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3944)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3547)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1173)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1062)
at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:155)
at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:635)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:338)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:559)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:150)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:155)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:660)
at org.eclipse.equinox.launcher.Main.basicRun(Main.java:597)
at org.eclipse.equinox.launcher.Main.run(Main.java:1468)
at org.eclipse.equinox.launcher.Main.main(Main.java:1441)

Provide Dart wizards

I suggest to add a new Dart project wizard and a new Dart file wizard. For Eclipse users is it quite normal to have wizards for creating new elements.

Preference page should handle typed events

STEPS:

  1. Open Dart preference page.
  2. Type path of the "Dart SDK Location" instead of selecting from "Browse" button.
  3. Preference page is unable to validate even we write the right value.

Exception when using "Quick Access"

When trying to use the quick access bar in Eclipse, an error is sent by the language server:

[t=1559985255637] LSP4E to org.eclipse.dartboard.server1:
{"jsonrpc":"2.0","id":"9","method":"workspace/symbol","params":{}}

[t=1559985255696] org.eclipse.dartboard.server1 to LSP4E:
{"id":"9","jsonrpc":"2.0","error":{"code":-32602,"message":"Invalid params for workspace/symbol"}}

Apparently it's not supported to send workspace/symbol with an empty params parameter.

Issues with Dart preference page

If the user inputs an incorrect Dart location, the Apply button becomes inactive, it remains inactive, even if the user changes something.

Restore Defaults simply remove the user input, please use something more reasonable, like a check which checks the typical install locations and uses the one that could be confirmed.

It would IMHO also beneficial, if you could add a "Validate" button, so that the user can see if the location is valid.

If SDK is entered after the file creation no errors/warnings are shown

If SDK is entered after the file creation no errors/warnings are shown. To test:

Start Eclipse with new workspace and ensure that the Dart SDK is not yet entered for this workspace
Create a new file

void main() {
	var bike = new Bicycle(2, 0, 1);
	print(bike);
}

-> No errors shows and the SDK is not yet available.

Now enter the SDK location and switch back to the Editor -> still no errors are shown.

Please support Java8.

The build fails on Java8 due to usage of InputStream.transferTo() and Optional.ifPresentOrElse():

[ERROR] Failed to execute goal org.eclipse.tycho:tycho-compiler-plugin:1.3.0:compile (default-compile) on project org.eclipse.dartboard: Compilation failure: Compilation failure:
[ERROR] Z:\git\eclipse-dart\org.eclipse.dartboard\src\org\eclipse\dartboard\launch\console\DartConsoleFactory.java:[44]
[ERROR]         inputStream.transferTo(outputSteam);
[ERROR]                     ^^^^^^^^^^
[ERROR] The method transferTo(IOConsoleOutputStream) is undefined for the type InputStream
[ERROR] Z:\git\eclipse-dart\org.eclipse.dartboard\src\org\eclipse\dartboard\preference\DartPreferencePage.java:[86]
[ERROR]         optionalVersion.ifPresentOrElse((version) -> {
[ERROR]                         ^^^^^^^^^^^^^^^
[ERROR] The method ifPresentOrElse((<no type> version) -> {}, () -> {}) is undefined for the type Optional<String>

Setup nighly and integration builds

As discussed, we will setup a nightly update site which is rebuilt every night from master.
Secondly we will add an "integration" build that pushes the results of every commit to a "integration" update site.

Pub support

The pub package manager should be supported natively.

Handle "Unsupported notification method: $/analyzerStatus"

The Dart analysis server uses $/analyzerStatus to indicate the status of the analyzer.
LSP4J does not support this, and throws an error to the console. We should suppress or handle the error accordingly.

Note: that it might be useful to actually have the notification be used for an indicator in the ui (maybe a progress bar at the bottom).

Add ability to run a dart project via "Run As"

We should add the ability to run a dart project via the run as context menus.

I've started implementing this in b4b22d8.

There should also be the ability to browse for a main file (e.g. main.dart) via a dialog.
Similiar to the java config page:
image

ErrorStream not shown in console output

I created a small test program:

class Bicycle {
  int cadence;
  int speed;
  int gear;
}

void main() {
	var bike = new Bicycle(2, 0, 1);
	print(bike);
}

Running this via the Dart run Configuration gives no output. Here is the run configuration.

image

Fix logging

After adding the SLF4J dependencies there is an error shown on startup:

SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder".
SLF4J: Defaulting to no-operation (NOP) logger implementation
SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further details.

Logging also doesn't work.

Execute of program freezes Eclipse

Looks like the execution of a program happens in the main thread. To test use the following program:

import 'dart:io';
import 'dart:convert';
void main() {
  HttpClient()
    .getUrl(Uri.parse('https://git.eclipse.org/r/changes/?q=status:open')) // produces a request object
    .then((request) => request.close()) // sends the request
    .then((response) => response.transform(Utf8Decoder()).listen(print)); // transforms and prints the response
}

Run it and you will see that Eclipse freezes.

Request use of Dart logo

For use for launch configurations, and other places inside the plugin.

I requested the use of the icon asset with the eclipse foundation.

Support dartfmt

There should be the ability to run clean up actions via https://github.com/dart-lang/dart_style.

I'm not sure if the cleanup actions of eclipse can be expanded for this, but if that possible we should use it. Otherwise we could also add an External Tool?

NullPointerException in SymbolsModel#getChildren

SymbolsModel#getChildren regularly (seemingly random) throws this exception:

!ENTRY org.eclipse.ui.navigator 4 0 2019-01-15 15:38:53.175
!MESSAGE An exception occurred invoking extension: org.eclipse.lsp4e.outline.content for object org.eclipse.jface.viewers.TreePath@36e95b7b
!STACK 0
java.lang.NullPointerException
	at org.eclipse.lsp4e.outline.SymbolsModel.getChildren(SymbolsModel.java:138)
	at org.eclipse.lsp4e.outline.LSSymbolsContentProvider.hasChildren(LSSymbolsContentProvider.java:240)
	at org.eclipse.ui.internal.navigator.extensions.SafeDelegateTreeContentProvider.hasChildren(SafeDelegateTreeContentProvider.java:115)
	at org.eclipse.ui.internal.navigator.NavigatorContentServiceContentProvider.callNormalHasChildren(NavigatorContentServiceContentProvider.java:445)
	at org.eclipse.ui.internal.navigator.NavigatorContentServiceContentProvider.access$4(NavigatorContentServiceContentProvider.java:440)
	at org.eclipse.ui.internal.navigator.NavigatorContentServiceContentProvider$3.run(NavigatorContentServiceContentProvider.java:408)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:45)
	at org.eclipse.ui.internal.navigator.NavigatorContentServiceContentProvider.hasChildren(NavigatorContentServiceContentProvider.java:393)
	at org.eclipse.ui.internal.navigator.NavigatorContentServiceContentProvider.hasChildren(NavigatorContentServiceContentProvider.java:437)
	at org.eclipse.jface.viewers.AbstractTreeViewer.isExpandable(AbstractTreeViewer.java:2158)
	at org.eclipse.jface.viewers.TreeViewer.isExpandable(TreeViewer.java:546)
	at org.eclipse.jface.viewers.AbstractTreeViewer.isExpandable(AbstractTreeViewer.java:2196)
	at org.eclipse.jface.viewers.AbstractTreeViewer.optionallyPruneChildren(AbstractTreeViewer.java:2829)
	at org.eclipse.jface.viewers.AbstractTreeViewer.updateChildren(AbstractTreeViewer.java:2628)
	at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefreshStruct(AbstractTreeViewer.java:1953)
	at org.eclipse.jface.viewers.TreeViewer.internalRefreshStruct(TreeViewer.java:677)
	at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefreshStruct(AbstractTreeViewer.java:1959)
	at org.eclipse.jface.viewers.TreeViewer.internalRefreshStruct(TreeViewer.java:677)
	at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh(AbstractTreeViewer.java:1929)
	at org.eclipse.jface.viewers.AbstractTreeViewer.internalRefresh(AbstractTreeViewer.java:1886)
	at org.eclipse.ui.navigator.CommonViewer.internalRefresh(CommonViewer.java:532)
	at org.eclipse.jface.viewers.StructuredViewer.lambda$3(StructuredViewer.java:1533)
	at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1449)
	at org.eclipse.jface.viewers.TreeViewer.preservingSelection(TreeViewer.java:363)
	at org.eclipse.jface.viewers.StructuredViewer.preservingSelection(StructuredViewer.java:1410)
	at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1533)
	at org.eclipse.jface.viewers.ColumnViewer.refresh(ColumnViewer.java:538)
	at org.eclipse.ui.navigator.CommonViewer.refresh(CommonViewer.java:352)
	at org.eclipse.ui.navigator.CommonViewer.refresh(CommonViewer.java:495)
	at org.eclipse.jface.viewers.StructuredViewer.refresh(StructuredViewer.java:1469)
	at org.eclipse.lsp4e.outline.LSSymbolsContentProvider.lambda$2(LSSymbolsContentProvider.java:257)
	at org.eclipse.swt.widgets.RunnableLock.run(RunnableLock.java:40)
	at org.eclipse.swt.widgets.Synchronizer.runAsyncMessages(Synchronizer.java:185)
	at org.eclipse.swt.widgets.Display.runAsyncMessages(Display.java:4906)
	at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:4475)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine$5.run(PartRenderingEngine.java:1173)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
	at org.eclipse.e4.ui.internal.workbench.swt.PartRenderingEngine.run(PartRenderingEngine.java:1062)
	at org.eclipse.e4.ui.internal.workbench.E4Workbench.createAndRunUI(E4Workbench.java:156)
	at org.eclipse.ui.internal.Workbench.lambda$3(Workbench.java:636)
	at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:339)
	at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:563)
	at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:151)
	at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:155)
	at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:203)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:137)
	at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:107)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
	at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:255)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.lang.reflect.Method.invoke(Method.java:498)
	at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:659)
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:595)
	at org.eclipse.equinox.launcher.Main.run(Main.java:1501)
	at org.eclipse.equinox.launcher.Main.main(Main.java:1474)

Add EPL 2.0 to source files

We should add the EPL 2.0 to every source file. Template:

/*******************************************************************************
 * Copyright (c) 2019 vogella GmbH 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:
 *     Jonas Hungershausen - initial API and implementation
 *******************************************************************************/

We should be able to use the copyright tooling from Eclipse for that.

Add code snippets

There should be code snippets for the following actions:

  • Constructor
  • function/method
  • import?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.