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 212319 - Wrong coloring of marker variable
Summary: Wrong coloring of marker variable
Status: RESOLVED FIXED
Alias: None
Product: javascript
Classification: Unclassified
Component: Editor (show other bugs)
Version: 7.2
Hardware: PC Linux
: P3 normal with 1 vote (vote)
Assignee: Petr Pisl
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-10 14:36 UTC by Petr Pisl
Modified: 2013-07-19 02:31 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Pisl 2012-05-10 14:36:19 UTC
Try to paset the code in the editor. marker variable is bold. Shouldn't be.
google.load('maps', '2.x');
var gmap = {
    map: false,
    markers: [],
    bounds: false,
    addMarker: function(m) {
        if (!gmap.bounds) gmap.bounds = new
                    google.maps.LatLngBounds();
        m.lat = m.lat * 57.2957795;
        m.lng = m.lng * 57.2957795;
        var coords = new google.maps.LatLng(m.lat, m.lng);
        var marker = new google.maps.Marker(coords);
        marker.bindInfoWindowHtml(m.label);
        gmap.markers.push(marker);
        gmap.bounds.extend(coords);
    },
    renderMap: function(map_id) {
        gmap.map = new
                google.maps.Map2(document.getElementById(map_id));
        var zoom = gmap.map.getBoundsZoomLevel(gmap.bounds);
        if (zoom > 15) zoom = 15;
        gmap.map.setCenter(gmap.bounds.getCenter(), zoom);
        var i = 0;
        for (i = 0; i < gmap.markers.length; i++) {
            gmap.map.addOverlay(gmap.markers[i]);
        }
        gmap.map.setUIToDefault();
    }
}

function initialize() {
    if (GBrowserIsCompatible()) {
        gmap.renderMap('map');
    }
}

$(document).ready(function() {
    google.setOnLoadCallback(initialize);
});
Comment 1 Petr Pisl 2012-05-10 14:37:23 UTC
Strange coloring at all in the new JS editor.
Comment 2 Petr Hejl 2012-09-13 11:50:17 UTC
Still valid.
Comment 3 Petr Pisl 2013-07-18 08:53:36 UTC
Now works correctly; http://hg.netbeans.org/web-main/rev/1ec45a80f9dd
Comment 4 Quality Engineering 2013-07-19 02:31:36 UTC
Integrated into 'main-silver', will be available in build *201307182300* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)

Changeset: http://hg.netbeans.org/main-silver/rev/1ec45a80f9dd
User: Petr Pisl <ppisl@netbeans.org>
Log: #212319 - Wrong coloring of marker variable