Giter Site home page Giter Site logo

tunnelvisionlabs / javaforvs Goto Github PK

View Code? Open in Web Editor NEW
110.0 19.0 27.0 904 KB

Java Language Support extension for Visual Studio

Home Page: https://visualstudiogallery.msdn.microsoft.com/bc561769-36ff-4a40-9504-e266e8706f93/

License: Other

Java 0.01% C# 98.98% Smalltalk 0.06% C++ 0.05% ANTLR 0.90%

javaforvs's Introduction

Java Language Support for Visual Studio

Join the chat at https://gitter.im/tunnelvisionlabs/JavaForVS

This repository contains the Java-related features originally developed in tunnelvisionlabs/LangSvcV2. It is the home for ongoing development on the Java Language Support extension for Visual Studio.

javaforvs's People

Contributors

advntss avatar gitter-badger avatar sharwell 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

javaforvs's Issues

Not working with VS 2015?

I want to start the java console application project “hello world” in Visual Studio 2015

I get the following error:

screenhunter_44 mar 03 13 20

The activity log file tells

“A MEF Component threw an exception at runtime: Microsoft.VisualStudio.ExtensibilityHosting.InvalidMEFCacheException: The Visual Studio component cache is out of date. Please restart Visual Studio.”

and also it occurs to me that a package "Tvl.VisualStudio.Language.Java.JavaLanguagePackage, Tvl.VisualStudio.Language.Java, Version=1.2.0.0" is not loaded properly or is not stored in the right path.

A complete description of my entry in the msdn forum can be found under
https://social.msdn.microsoft.com/Forums/vstudio/en-US/b08a63c4-4d8a-42db-8778-b3e787527714/java-in-visual-studio-2015?forum=vssetup

The package works fine in VS 2013.

The same error has been found by other users, see my entry .

Thanks for proposing a solution, kind regards, Harald

TVL Intellisense Stopped Working

In the first project I made in JavaForVS, the intellisense worked. However, in subsequent projects, I get a variety of error messages flashing across the top of the text editor, saying things like "File not found: [the file I currently have open in the editor]".

Also, the bar above the editor says "[ProjectName] does not exist" whenever I attempt to navigate to the definition of an object.

Lastly, sometimes the bar says "Java file is not part of an workspace. Intellisense is not available," though this last one may be due to me misconfiguring something.

The TVL Diagnostics output doesn't contain any errors, only this sort of thing:
Parser queue has 0 items remaining
RecipesIC2.java: Background parse succeeded in 7ms.

Simplify java.lang type names in the debugger

Originally posted at tunnelvisionlabs/LangSvcV2#30.

Currently types like Object are shown as java.lang.Object in the debugger. To reduce the horizontal space required by the watch windows (and thus provide users with easier access to information), types in the java.lang package should be automatically simplified to their short form.

Incompatible with VS2017 RC edition

I would like to try out this plugin but I am currently using VS2017 RC edition and it is unsupported/incompatible. I am currently working on a Java project and would ove to be able to use VS again but VS2015 just takes too long to install and is pretty hefty in terms of size. Please add 2017 compatibility

Classpath modification

Originally posted by @sriksrid at tunnelvisionlabs/LangSvcV2#45.

Hi

I noticed that when I debug/run a file, a classpath is being specified (the jar file built), and this is causing my existing classpath to be ignored (I even added an extra cp command to the command line options, but that doesn't work either). Is there I way I can append entries to the classpath override for debug/run? I'm willing to edit the configuration files, if necessary.

The build works fine if I specify the libraries in References; however they do not get carried over to debug - which is why I want to modify the classpath.

Thank you

Renaming/deleting folders in "src" folder tree crashes plugin

(repost from microsoft/vsminecraft#18)

I set up a new Java project using the "New MinecraftForge Mod (Minecraft 1.8)" template (from Microsoft's Minecraft plugin), and went to rename the folder "examplemod" under "src/main/java/com" to my own package name using F2. As soon as I hit "Enter", it displayed an error box noting something about "examplemod" being removed from the hierarchy. The folder stayed named "examplemod" in Visual Studio, but was renamed on the filesystem. Refreshing the view nor reloading the project fixed the folder's name in VS, so the file was "not found" to the IDE. I had to edit the .javaproject file manually in Notepad++ to change the references to the correct folder, and then reload the project.

This happens when renaming or deleting any file in my project's "src" folder. It makes it hard to refactor as I have to edit the .javaproject file every time.

Incorrect Output Window Behavior

Hey guys -- cross logging this from another repro' at the maintainer's request.

Apologies, as the wording is Minecraft specific, and I haven't used your project directly, so I don't know the correct phraseology to use in all instances (so, I've re-posted it below, unaltered):


Instead of logging to the output window (like Eclipse or other IDEs do with other Minecraft mods -- or even like you would expect Visual Studio to do) instead of that, a new console window comes up and the output is displayed there.

Instead, that console stream should be redirected to the output window. (Normal applications in Visual Studio log to the output window instead of creating new console windows -- Note: if you don't want to lose the other data that's being logged to the "Debug" source in the output window, you can create a new source for the output window).

First screenshot shows the Console Window being up on the display and the type of data that's both in the Console window and the "Debug" source of the output window.

Console Window & Output Window

Second screenshot shows an example of other sources for the Output window. -- Ideally, you could just create a "Minecraft" source and redirect stdout from "java.exe".

Output Window Sources

When you implement this, please set the Output window's source to "Minecraft" by default when the debugger is attached.

Publish build tools in NuGet

Originally posted at tunnelvisionlabs/LangSvcV2#28.

The Java build tools are currently part of the template when a project is created. If users exclude the top-level packages folder from source control, the build system will not be included when other users clone the project. To easily resolve this, the tools need to be available in NuGet (even if they are hidden from search results).

Visual Studio community support has the wrong name

I have VS 2013 community installed in my machine but when installing the plugin it says "install on VS professional 2013".
I know essentially VS community == VS professional, but just report this issue in case we are not aware of this...

An official forum should be made

Forums are a great place for a developer to get information from the users as they end up talking about stuff they have experienced, stuff they would like to see, etc. Please make an official forum!

it doesn't work

------ 已启动生成: 项目: ConsoleApplication2, 配置: Debug Any CPU ------
C:\Java\jdk1.7.0_51\bin\javac.exe -verbose -g -d obj/Debug/ -Xlint -deprecation src/main/java/pkg/Program.java
D:\works\javaworks\ConsoleApplication2\packages\Tvl.Java.1.2.0\build\Tvl.Jvm.Common.targets(3018,5): error MSB3030: 无法复制文件“obj\Debug\ConsoleApplication2.jar”,原因是找不到该文件。
已完成生成项目“ConsoleApplication2.javaproj”的操作 - 失败。

it can not copy the jar file because it can not found

Statement stepping does not stop at `break` statements

Originally posted at tunnelvisionlabs/LangSvcV2#19.

The break statement in bytecode appears as a goto instruction with a stack depth of 0. Currently the algorithm for statement stepping silently follows goto instructions without stopping. This should be updated to not follow the goto instruction when the target of the jump does not fall on the same line as the goto instruction itself.

Support `ResourceFolder` item type for folders

Originally posted at tunnelvisionlabs/LangSvcV2#27.

Resource folders are folders whose contents are included in the final Jar file. These are common in Java builds.

Currently the only way to add these items is by manually editing the project file to include something like the following:

<_CoreCreatePackageResourceInputs Include="src\main\resources\assets\**\*.*">
  <BaseOutputDirectory>src\main\resources\</BaseOutputDirectory>
</_CoreCreatePackageResourceInputs>

Automatically detect startup class when unique

If a project contains only one class with a suitable main method, automatically use that class as the startup class for debugging rather than require all users set the debug settings manually.

Support using JDWP as the debug transport

Not all virtual machines support the custom debug agents typically used by this extension. In those cases, it would be helpful to use JDWP as the debugging transport.

Debugging AnyCPU requires a 64-bit JDK on 64-bit OS

Currently, if you attempt to debug an application on a 64-bit OS use the Any CPU solution platform, and you only have a 32-bit JDK installed, the debugging operation will flash a window on the screen and then stop.

The problem stems from the fact that the debug launch algorithm automatically detects the appropriate version of the JDK to use (which may be a 32-bit JDK in this case), but does not then make sure and match the correct debug agent with the chosen runtime. In other words, when you try to debug this scenario, the Tvl.Java.DebugHostWrapperX64.dll agent is used with a 32-bit JDK.

The following workarounds are currently available:

  1. Use the X86 solution platform instead of Any CPU.
  2. Install a 64-bit JDK if you have a 64-bit operating system.

The debug agent filename is currently chosen by the following code:

bool x64 = Platform.EndsWith("X64", StringComparison.OrdinalIgnoreCase) || (Platform.EndsWith("Any CPU", StringComparison.OrdinalIgnoreCase) && Environment.Is64BitOperatingSystem);
string agentBaseFileName = "Tvl.Java.DebugHostWrapper";
if (x64)
agentBaseFileName += "X64";

Intellisense not working

I've installed Visual Studio 2015 RC on a clean version of windows. I've then installed the Minecraft Mod pack and the java language support, however, whenever I create a console application (or any other by that matter) I get a message that : "Java file is not part of a workspace. Intellisense is not available". I've checked and the project compiles but the absence of Intellisense is quite annoying. Do I need to do anything to get it? Am I missing something? (already posted the issue on https://github.com/tunnelvisionlabs/LangSvcV2 I've been suggested to move it here)

I can´t install Java for VS win 10

I am using Windows 10 Pro, with Visual Studio Community 2015 installed. But I can't install Java Language Support by clicking the iron of Java Language Support program.

Can you guide me?

Thank you.

Command line builds using msbuild fail if not previously built in visual studio.

The projects do not build using command line unless previously built in visual studio. Looking on the msbuild scripts, I have tracked it down to two targets failing to work.

_ComputeNonExistentFileProperty and CoreCompile.

Because I am not in visual studio, the _ComputeNonExistentFileProperty target never runs and thus I get the following issue:

Skipping target "CoreCompile" because it has no outputs.
Though the target has declared its outputs, the output specification only references empty properties and/or empty item lists.
Done building target "CoreCompile" in project "Project.javaproj".: (TargetId:42)

However, I feel like your logic for detecting the inputs and outputs for the target may be flawed since we are relying on a nonexistent file to not exist for the CoreCompile target to even run. You should probably build out the CompileOutputs itemgroup outside of the target instead of inside of it.

Assembly could not be found in MEF cache.

VS.Platform.ExtensibilityHosting.MefCacheInvalidation.Description=Assembly could not be found in MEF cache.;VS.Platform.ExtensibilityHosting.MefCacheInvalidation.LoadedAssembly.Name=Tvl.VisualStudio.Shell, Version=1.2.0.0, Culture=neutral, PublicKeyToken=d1ffeb5697e9c872;VS.Platform.ExtensibilityHosting.MefCacheInvalidation.LoadedAssembly.Path=C:/USERS/ANDY.CHAO/APPDATA/LOCAL/MICROSOFT/VISUALSTUDIO/14.0/EXTENSIONS/2LCWU3ES.TLV/Tvl.VisualStudio.Shell.DLL;VS.Platform.ExtensibilityHosting.MefCacheInvalidation.LoadedAssembly.Timestamp=2016/1/25 上午 08:44:20

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.