netbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Christian Lenz (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (NETBEANS-27) Editor should recognize the filetype via unix comment, from the first line
Date Tue, 04 Jul 2017 13:26:00 GMT

    [ https://issues.apache.org/jira/browse/NETBEANS-27?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16073663#comment-16073663
] 

Christian Lenz commented on NETBEANS-27:
----------------------------------------

For now I will try this plugin: http://plugins.netbeans.org/plugin/55076/no-extension-mime-resolver
but it should be available native in NetBeans.

> Editor should recognize the filetype via unix comment, from the first line
> --------------------------------------------------------------------------
>
>                 Key: NETBEANS-27
>                 URL: https://issues.apache.org/jira/browse/NETBEANS-27
>             Project: NetBeans
>          Issue Type: Bug
>          Components: editor - Formatting & Indentation, editor - Parsing & Indexing
>    Affects Versions: 8.2
>            Reporter: Christian Lenz
>
> I created a HTML5/JS Application with NodeJS, I activated express to use it. After next,
the express.cmd created a project template. Inside the bin folder, there is a file called
www. Here is a little example of the code:
> {code}
> #!/usr/bin/env node
> /**
>  * Module dependencies.
>  */
> var app = require('../app');
> var debug = require('debug')('jade:server');
> var http = require('http');
> /**
>  * Get port from environment and store in Express.
>  */
> var port = normalizePort(process.env.PORT || '3000');
> app.set('port', port);
> /**
>  * Create HTTP server.
>  */
> {code}
> NetBeans doesn't know that this is JS code, and it will not treat it as a JS file. So
the editor should recognize the type from the comment from the first line, which comes from
unix systems(?). I tried the same source in WebStorm and Visual Studio Code and it works very
well as expected.
> I don't want to set the mimetype for the www file to js, because it will affect every
file, without having an extension, which is not good. I tried it and any file, which has no
extension is now a JS file in my IDE.
> So please let the editor set the mimetype from this comment, to the supported mimetype
from NetBeans.
> Regards
> Chris



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message