This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 118191 - If user opened external shell script in IDE, then he/she cannot create and run new script
Summary: If user opened external shell script in IDE, then he/she cannot create and ru...
Status: VERIFIED FIXED
Alias: None
Product: cnd
Classification: Unclassified
Component: -- Other -- (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker (vote)
Assignee: Vladimir Voskresensky
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-09 09:32 UTC by soldatov
Modified: 2007-10-31 16:50 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
Screenshot (32.90 KB, image/png)
2007-10-09 09:34 UTC, soldatov
Details

Note You need to log in before you can comment on or make changes to this bug.
Description soldatov 2007-10-09 09:32:42 UTC
Steps:
- Create project
- Push 'File|Open File...' menu item
- Select '<NETBEANS_INSTALL_DIR/bin/netbeans' file
==> file appears in editor
- Push 'File|New File...' menu item
==> 'Bourne Shell Script(.sh)' file type in 'Shell Script Files' category has wrong icon
- Push 'Next' and 'Finish'
==> Such text appeared in editor:
------------------------------------------------------
#! /bin/%<%EXTENSION%>%
# 
# File:   %<%NAME%>%.%<%EXTENSION%>%
# Author: %<%USER%>%
#
# Created on %<%DATE%>%, %<%TIME%>%
#
------------------------------------------------------

And I cannot run this file ('Run' menu item in context menu is missed)
Comment 1 soldatov 2007-10-09 09:34:13 UTC
Created attachment 50473 [details]
Screenshot
Comment 2 soldatov 2007-10-09 11:26:53 UTC
in 200710010000 build I have not such problem
Comment 3 soldatov 2007-10-09 11:45:37 UTC
Sorry. I verified this bug in 200710010000 build some times. And bug appears in ~50% cases.
Comment 4 soldatov 2007-10-09 12:06:58 UTC
In latest build same behavior (50% vs 50%). I can reproduce bug in half cases.
Comment 5 Vladimir Voskresensky 2007-10-09 15:40:45 UTC
we need to prevent this 50/50 behavior, because Run is important action for shell scripts
Comment 6 Vladimir Voskresensky 2007-10-09 15:47:51 UTC
I think, it's best to have embedded editor (with extended syntax HL), but our data object to associate needed actions on it
Comment 7 Vladimir Voskresensky 2007-10-09 18:42:08 UTC
fixed:
- depend on Sh support from ide8 cluster
- use it's editor support for shell files
- consider all shell files with text/sh mime type
- detect shell files without extension by first line content

cvs log:
Checking in resources/mf-layer.xml;
/shared/data/ccvs/repository/cnd/core/src/org/netbeans/modules/cnd/resources/mf-layer.xml,v  <--  mf-layer.xml
new revision: 1.31; previous revision: 1.30
done
Checking in resources/mime-resolver-hex-based.xml;
/shared/data/ccvs/repository/cnd/core/src/org/netbeans/modules/cnd/resources/mime-resolver-hex-based.xml,v  <-- 
mime-resolver-hex-based.xml
new revision: 1.2; previous revision: 1.1
done
Checking in loaders/CndAbstractDataLoader.java;
/shared/data/ccvs/repository/cnd/core/src/org/netbeans/modules/cnd/loaders/CndAbstractDataLoader.java,v  <-- 
CndAbstractDataLoader.java
new revision: 1.11; previous revision: 1.10
done
Checking in loaders/CndSniffyMIMEResolver.java;
/shared/data/ccvs/repository/cnd/core/src/org/netbeans/modules/cnd/loaders/CndSniffyMIMEResolver.java,v  <-- 
CndSniffyMIMEResolver.java
new revision: 1.2; previous revision: 1.1
done
Checking in loaders/ShellDataLoader.java;
/shared/data/ccvs/repository/cnd/core/src/org/netbeans/modules/cnd/loaders/ShellDataLoader.java,v  <--  ShellDataLoader.java
new revision: 1.12; previous revision: 1.11
done
Checking in loaders/HDataLoader.java;
/shared/data/ccvs/repository/cnd/core/src/org/netbeans/modules/cnd/loaders/HDataLoader.java,v  <--  HDataLoader.java
new revision: 1.16; previous revision: 1.15
done
Checking in MIMENames.java;
/shared/data/ccvs/repository/cnd/core/src/org/netbeans/modules/cnd/MIMENames.java,v  <--  MIMENames.java
new revision: 1.7; previous revision: 1.6
done
Comment 8 soldatov 2007-10-31 16:50:51 UTC
verified in 200710301200 build