Skip to content

Commit

Permalink
Revert some changes
Browse files Browse the repository at this point in the history
Those were to get an icon in the Open With menu but that's not worth it
  • Loading branch information
martinRenou committed Oct 23, 2024
1 parent 73b66e3 commit d4b2c55
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion python/jupytercad_core/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ readme = "README.md"
requires-python = ">=3.8"

[project.entry-points.jupyter_ydoc]
JupyterCAD = "jupytercad_core.jcad_ydoc:YJCad"
jcad = "jupytercad_core.jcad_ydoc:YJCad"
step = "jupytercad_core.step_ydoc:YSTEP"
stl = "jupytercad_core.stl_ydoc:YSTL"

Expand Down
2 changes: 1 addition & 1 deletion python/jupytercad_core/src/jcadplugin/modelfactory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export class JupyterCadJcadModelFactory
* @returns The content type
*/
get contentType(): Contents.ContentType {
return 'JupyterCAD';
return 'jcad';
}

/**
Expand Down
11 changes: 6 additions & 5 deletions python/jupytercad_core/src/jcadplugin/plugins.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ import { JupyterCadJcadModelFactory } from './modelfactory';
import { MimeDocumentFactory } from '@jupyterlab/docregistry';

const FACTORY = 'JupyterCAD';
const CONTENT_TYPE = 'jcad';
const PALETTE_CATEGORY = 'JupyterCAD';

namespace CommandIDs {
Expand All @@ -59,8 +60,8 @@ const activate = (
const widgetFactory = new JupyterCadWidgetFactory({
name: FACTORY,
modelName: 'jupytercad-jcadmodel',
fileTypes: [FACTORY],
defaultFor: [FACTORY],
fileTypes: [CONTENT_TYPE],
defaultFor: [CONTENT_TYPE],
tracker,
commands: app.commands,
workerRegistry,
Expand All @@ -81,7 +82,7 @@ const activate = (
modelName: 'jupytercad-jcadmodel',
name: 'JSON Editor',
primaryFileType: app.docRegistry.getFileType('json'),
fileTypes: [FACTORY]
fileTypes: [CONTENT_TYPE]
});
app.docRegistry.addWidgetFactory(factory);

Expand All @@ -92,12 +93,12 @@ const activate = (
app.docRegistry.addModelFactory(modelFactory);
// register the filetype
app.docRegistry.addFileType({
name: FACTORY,
name: CONTENT_TYPE,
displayName: FACTORY,
mimeTypes: ['text/json'],
extensions: ['.jcad', '.JCAD'],
fileFormat: 'text',
contentType: FACTORY,
contentType: CONTENT_TYPE,
icon: logoIcon
});

Expand Down

0 comments on commit d4b2c55

Please sign in to comment.