Skip to content

Commit

Permalink
fix: update formatting to the right one
Browse files Browse the repository at this point in the history
  • Loading branch information
sigmaaa committed Jul 26, 2024
1 parent ef51793 commit 46a6356
Showing 1 changed file with 18 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,30 +13,30 @@

import com.espressif.idf.core.ILSPConstants;

public class ClangFormatFileHandler {
public class ClangFormatFileHandler
{
private final IFile clangFormatFile;

private final IFile clangFormatFile;

public ClangFormatFileHandler(IProject project) throws CoreException
{
this.clangFormatFile = project.getFile(ILSPConstants.CLANG_FORMAT_FILE);
}
public ClangFormatFileHandler(IProject project) throws CoreException
{
this.clangFormatFile = project.getFile(ILSPConstants.CLANG_FORMAT_FILE);
}

/**
* Updates the .clang-format file. If the file does not exist, it is created and initialized with default settings.
*
* @throws IOException if an I/O error occurs during file creation or writing
* @throws CoreException if an error occurs while refreshing the project
*/
public void update() throws IOException, CoreException
{
if (clangFormatFile.exists())
{
return;
}
try (final var source = getClass().getResourceAsStream(".clang-format-project");) //$NON-NLS-1$
{
clangFormatFile.create(source, true, new NullProgressMonitor());
}
}
public void update() throws IOException, CoreException
{
if (clangFormatFile.exists())
{
return;
}
try (final var source = getClass().getResourceAsStream(".clang-format-project");) //$NON-NLS-1$
{
clangFormatFile.create(source, true, new NullProgressMonitor());
}
}
}

0 comments on commit 46a6356

Please sign in to comment.