Code Monkey home page Code Monkey logo

dartboard's Introduction

Currently not actively developed, please see https://github.com/dart4e/dart4e/ for Dart and Flutter support in the Eclipse IDE.

Dartboard Jenkins Version

Dartboard is an Eclipse plugin for Dart and Flutter development. The Dartboard official Twitter account is @DartEclipse

60813009 0e148100 a193 11e9 95e8 63f08fcea976

Dart and the related logo are trademarks of Google LLC. We are not endorsed by or affiliated with Google LLC.

Prerequisites

This project requires a recent version of the Wild Web Developer. You have to install this first if your Eclipse installation does not already include it.

Installation

Download and install at least Dart 2.2. from the Dart download page.

Check by running $ dart --version after installation.

Install the Eclipse plugin from the Marketplace or use the btn install button.

There is also p2 update sites available at.

Nightly:

0.1 release:

Features

Thanks to the language server protocol and the analysis server provided by the Dart team Dartboard already contains many features.

The language server provides the necessary analysis and TextMate grammars provide syntax highlighting to enrich the development experience.

Syntax Highlight

  • Running Dart programs directly from the IDE

Dart Console

How to build

To build the project use Maven. Please note that 3.6.1 and 3.6.2 have a bug, use either a later version or Maven 3.6.0.

mvn clean verify

Contributing

There are many ways in which you can participate in the project, for example:

If you are interested in fixing issues or contributing directly to the code base, please see the document How to Contribute. and Development wiki for instructions on how to contribute to the repository.

CI is available at Eclipse Foundation Jenkins

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

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.

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])	
}

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)

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.

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)

Pub support

The pub package manager should be supported natively.

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.

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.

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.

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

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.

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?

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

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 code snippets

There should be code snippets for the following actions:

  • Constructor
  • function/method
  • import?

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.

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.

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.

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.